aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 20:11:50 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:26:50 -0500
commit6c7be55ca0c204473d07a030a03c49a7471b4508 (patch)
treed1dd7c14a0b723523834ecc09199fbfe9e50139f /net
parentcd4ff034e3572679f7ff8f126469b3addd1a4fbc (diff)
[SCTP]: sctp_has_association() switched to net-endian.
Ditto for its only caller (sctp_endpoint_is_peeled_off) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/sctp/endpointola.c2
-rw-r--r--net/sctp/input.c5
-rw-r--r--net/sctp/socket.c4
3 files changed, 4 insertions, 7 deletions
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c
index 5ffb1af336c0..4cca7792c961 100644
--- a/net/sctp/endpointola.c
+++ b/net/sctp/endpointola.c
@@ -305,7 +305,7 @@ int sctp_endpoint_is_peeled_off(struct sctp_endpoint *ep,
305 bp = &ep->base.bind_addr; 305 bp = &ep->base.bind_addr;
306 list_for_each(pos, &bp->address_list) { 306 list_for_each(pos, &bp->address_list) {
307 addr = list_entry(pos, struct sctp_sockaddr_entry, list); 307 addr = list_entry(pos, struct sctp_sockaddr_entry, list);
308 if (sctp_has_association(&addr->a_h, paddr)) { 308 if (sctp_has_association(&addr->a, paddr)) {
309 sctp_read_unlock(&ep->base.addr_lock); 309 sctp_read_unlock(&ep->base.addr_lock);
310 return 1; 310 return 1;
311 } 311 }
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 2d660f8d94fd..33111873a488 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -872,11 +872,8 @@ int sctp_has_association(const union sctp_addr *laddr,
872{ 872{
873 struct sctp_association *asoc; 873 struct sctp_association *asoc;
874 struct sctp_transport *transport; 874 struct sctp_transport *transport;
875 union sctp_addr tmp, tmp2;
876 flip_to_n(&tmp, laddr);
877 flip_to_n(&tmp2, paddr);
878 875
879 if ((asoc = sctp_lookup_association(&tmp, &tmp2, &transport))) { 876 if ((asoc = sctp_lookup_association(laddr, paddr, &transport))) {
880 sctp_association_put(asoc); 877 sctp_association_put(asoc);
881 return 1; 878 return 1;
882 } 879 }
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 6beaa7821ca6..e118e3c1285e 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -1018,7 +1018,7 @@ static int __sctp_connect(struct sock* sk,
1018 * make sure that there is no peeled-off association matching 1018 * make sure that there is no peeled-off association matching
1019 * the peer address even on another socket. 1019 * the peer address even on another socket.
1020 */ 1020 */
1021 if (sctp_endpoint_is_peeled_off(ep, &to)) { 1021 if (sctp_endpoint_is_peeled_off(ep, sa_addr)) {
1022 err = -EADDRNOTAVAIL; 1022 err = -EADDRNOTAVAIL;
1023 goto out_free; 1023 goto out_free;
1024 } 1024 }
@@ -1475,7 +1475,7 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
1475 */ 1475 */
1476 if ((sctp_style(sk, TCP) && 1476 if ((sctp_style(sk, TCP) &&
1477 sctp_sstate(sk, ESTABLISHED)) || 1477 sctp_sstate(sk, ESTABLISHED)) ||
1478 sctp_endpoint_is_peeled_off(ep, &to)) { 1478 sctp_endpoint_is_peeled_off(ep, &tmp)) {
1479 err = -EADDRNOTAVAIL; 1479 err = -EADDRNOTAVAIL;
1480 goto out_unlock; 1480 goto out_unlock;
1481 } 1481 }