aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/associola.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 20:05:43 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:26:33 -0500
commit7e1e4a2b9dcc63ac3328f786f9d98bde90c8fc6c (patch)
treef11e2136bfd2af23399b173ddb47ea8d005289fa /net/sctp/associola.c
parent5f242a13e8505e0f3efd3113da6e029f6e7dfa32 (diff)
[SCTP]: Switch sctp_bind_addr_match() to net-endian.
Callers 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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 72199d149573..8d841f16dcbd 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -930,6 +930,8 @@ struct sctp_transport *sctp_assoc_is_match(struct sctp_association *asoc,
930 const union sctp_addr *paddr) 930 const union sctp_addr *paddr)
931{ 931{
932 struct sctp_transport *transport; 932 struct sctp_transport *transport;
933 union sctp_addr tmp;
934 flip_to_n(&tmp, laddr);
933 935
934 sctp_read_lock(&asoc->base.addr_lock); 936 sctp_read_lock(&asoc->base.addr_lock);
935 937
@@ -939,7 +941,7 @@ struct sctp_transport *sctp_assoc_is_match(struct sctp_association *asoc,
939 if (!transport) 941 if (!transport)
940 goto out; 942 goto out;
941 943
942 if (sctp_bind_addr_match(&asoc->base.bind_addr, laddr, 944 if (sctp_bind_addr_match(&asoc->base.bind_addr, &tmp,
943 sctp_sk(asoc->base.sk))) 945 sctp_sk(asoc->base.sk)))
944 goto out; 946 goto out;
945 } 947 }
@@ -1342,12 +1344,10 @@ int sctp_assoc_lookup_laddr(struct sctp_association *asoc,
1342 const union sctp_addr *laddr) 1344 const union sctp_addr *laddr)
1343{ 1345{
1344 int found; 1346 int found;
1345 union sctp_addr tmp;
1346 1347
1347 flip_to_h(&tmp, laddr);
1348 sctp_read_lock(&asoc->base.addr_lock); 1348 sctp_read_lock(&asoc->base.addr_lock);
1349 if ((asoc->base.bind_addr.port == ntohs(laddr->v4.sin_port)) && 1349 if ((asoc->base.bind_addr.port == ntohs(laddr->v4.sin_port)) &&
1350 sctp_bind_addr_match(&asoc->base.bind_addr, &tmp, 1350 sctp_bind_addr_match(&asoc->base.bind_addr, laddr,
1351 sctp_sk(asoc->base.sk))) { 1351 sctp_sk(asoc->base.sk))) {
1352 found = 1; 1352 found = 1;
1353 goto out; 1353 goto out;