aboutsummaryrefslogtreecommitdiff
path: root/net/sctp/associola.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 17:08:41 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-02 21:26:41 -0800
commite2fccedb0136205d02e97a41851503e2b96d2a17 (patch)
tree053ce92764dfac3e71d3a21786eff2b79a74cb72 /net/sctp/associola.c
parent1c7d1fc14974f44809b22521bd9796411d8ba440 (diff)
[SCTP]: Switch sctp_assoc_is_match to net-endian.
Along with it, statics in input.c that end up calling it (__sctp_lookup_association, sctp_lookup_association, __sctp_rcv_init_lookup, __sctp_rcv_lookup). Callers are adjusted. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/associola.c')
-rw-r--r--net/sctp/associola.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 3be8b6081a1..4bd916c808c 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -927,19 +927,16 @@ struct sctp_transport *sctp_assoc_is_match(struct sctp_association *asoc,
const union sctp_addr *paddr)
{
struct sctp_transport *transport;
- union sctp_addr tmp, tmp2;
- flip_to_n(&tmp, laddr);
- flip_to_n(&tmp2, paddr);
sctp_read_lock(&asoc->base.addr_lock);
- if ((asoc->base.bind_addr.port == laddr->v4.sin_port) &&
- (asoc->peer.port == paddr->v4.sin_port)) {
- transport = sctp_assoc_lookup_paddr(asoc, &tmp2);
+ if ((htons(asoc->base.bind_addr.port) == laddr->v4.sin_port) &&
+ (htons(asoc->peer.port) == paddr->v4.sin_port)) {
+ transport = sctp_assoc_lookup_paddr(asoc, paddr);
if (!transport)
goto out;
- if (sctp_bind_addr_match(&asoc->base.bind_addr, &tmp,
+ if (sctp_bind_addr_match(&asoc->base.bind_addr, laddr,
sctp_sk(asoc->base.sk)))
goto out;
}