diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-11-20 20:08:41 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:26:41 -0500 |
commit | e2fccedb0136205d02e97a41851503e2b96d2a17 (patch) | |
tree | 053ce92764dfac3e71d3a21786eff2b79a74cb72 /net/sctp/associola.c | |
parent | 1c7d1fc14974f44809b22521bd9796411d8ba440 (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.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 3be8b6081a15..4bd916c808c1 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, | |||
927 | const union sctp_addr *paddr) | 927 | const union sctp_addr *paddr) |
928 | { | 928 | { |
929 | struct sctp_transport *transport; | 929 | struct sctp_transport *transport; |
930 | union sctp_addr tmp, tmp2; | ||
931 | flip_to_n(&tmp, laddr); | ||
932 | flip_to_n(&tmp2, paddr); | ||
933 | 930 | ||
934 | sctp_read_lock(&asoc->base.addr_lock); | 931 | sctp_read_lock(&asoc->base.addr_lock); |
935 | 932 | ||
936 | if ((asoc->base.bind_addr.port == laddr->v4.sin_port) && | 933 | if ((htons(asoc->base.bind_addr.port) == laddr->v4.sin_port) && |
937 | (asoc->peer.port == paddr->v4.sin_port)) { | 934 | (htons(asoc->peer.port) == paddr->v4.sin_port)) { |
938 | transport = sctp_assoc_lookup_paddr(asoc, &tmp2); | 935 | transport = sctp_assoc_lookup_paddr(asoc, paddr); |
939 | if (!transport) | 936 | if (!transport) |
940 | goto out; | 937 | goto out; |
941 | 938 | ||
942 | if (sctp_bind_addr_match(&asoc->base.bind_addr, &tmp, | 939 | if (sctp_bind_addr_match(&asoc->base.bind_addr, laddr, |
943 | sctp_sk(asoc->base.sk))) | 940 | sctp_sk(asoc->base.sk))) |
944 | goto out; | 941 | goto out; |
945 | } | 942 | } |