diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-11-21 02:11:33 +0100 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 06:26:49 +0100 |
commit | cd4ff034e3572679f7ff8f126469b3addd1a4fbc (patch) | |
tree | 04fa32f4cfd96cdc81f8df3265ed36644a3e563f /net/sctp/endpointola.c | |
parent | [SCTP]: Switch ->from_addr_param() to net-endian. (diff) | |
download | linux-cd4ff034e3572679f7ff8f126469b3addd1a4fbc.tar.xz linux-cd4ff034e3572679f7ff8f126469b3addd1a4fbc.zip |
[SCTP]: sctp_endpoint_lookup_assoc() switched to net-endian.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/endpointola.c')
-rw-r--r-- | net/sctp/endpointola.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c index c543f3250645..5ffb1af336c0 100644 --- a/net/sctp/endpointola.c +++ b/net/sctp/endpointola.c @@ -257,16 +257,14 @@ static struct sctp_association *__sctp_endpoint_lookup_assoc( int rport; struct sctp_association *asoc; struct list_head *pos; - union sctp_addr tmp; - flip_to_n(&tmp, paddr); - rport = paddr->v4.sin_port; + rport = ntohs(paddr->v4.sin_port); list_for_each(pos, &ep->asocs) { asoc = list_entry(pos, struct sctp_association, asocs); if (rport == asoc->peer.port) { sctp_read_lock(&asoc->base.addr_lock); - *transport = sctp_assoc_lookup_paddr(asoc, &tmp); + *transport = sctp_assoc_lookup_paddr(asoc, paddr); sctp_read_unlock(&asoc->base.addr_lock); if (*transport) @@ -348,8 +346,10 @@ static void sctp_endpoint_bh_rcv(struct sctp_endpoint *ep) * COOKIE-ECHO chunk. */ if (NULL == chunk->asoc) { + union sctp_addr tmp; + flip_to_n(&tmp, sctp_source(chunk)); asoc = sctp_endpoint_lookup_assoc(ep, - sctp_source(chunk), + &tmp, &transport); chunk->asoc = asoc; chunk->transport = transport; |