diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-11-20 17:12:25 -0800 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-02 21:26:51 -0800 |
commit | 6a1e5f335461567f593e88b218f1c06817cbd323 (patch) | |
tree | 4cba2ea0f04c53d3f695bee61f164570a88633c9 /net/sctp/sm_statefuns.c | |
parent | 02a8a4db3b38ad2dd8bcfcca41694e043e44d282 (diff) |
[SCTP]: sctp_process_init() and sctp_source() switched to net-endian.
both are done in one go since almost always we have result of
the latter immediately passed to the former. Possibly non-obvious
note: sctp_process_param() is endian-agnostic
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/sm_statefuns.c')
-rw-r--r-- | net/sctp/sm_statefuns.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index c5362638d67..0848309773a 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c @@ -598,7 +598,6 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(const struct sctp_endpoint *ep, struct sctp_ulpevent *ev, *ai_ev = NULL; int error = 0; struct sctp_chunk *err_chk_p; - union sctp_addr tmp; /* If the packet is an OOTB packet which is temporarily on the * control endpoint, respond with an ABORT. @@ -666,9 +665,8 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(const struct sctp_endpoint *ep, */ peer_init = &chunk->subh.cookie_hdr->c.peer_init[0]; - flip_to_h(&tmp, &chunk->subh.cookie_hdr->c.peer_addr); if (!sctp_process_init(new_asoc, chunk->chunk_hdr->type, - &tmp, + &chunk->subh.cookie_hdr->c.peer_addr, peer_init, GFP_ATOMIC)) goto nomem_init; @@ -5105,7 +5103,6 @@ static struct sctp_packet *sctp_ootb_pkt_new(const struct sctp_association *asoc __u16 sport; __u16 dport; __u32 vtag; - union sctp_addr tmp; /* Get the source and destination port from the inbound packet. */ sport = ntohs(chunk->sctp_hdr->dest); @@ -5136,8 +5133,7 @@ static struct sctp_packet *sctp_ootb_pkt_new(const struct sctp_association *asoc } /* Make a transport for the bucket, Eliza... */ - flip_to_n(&tmp, sctp_source(chunk)); - transport = sctp_transport_new(&tmp, GFP_ATOMIC); + transport = sctp_transport_new(sctp_source(chunk), GFP_ATOMIC); if (!transport) goto nomem; |