aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/associola.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 20:05:23 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:26:32 -0500
commit5f242a13e8505e0f3efd3113da6e029f6e7dfa32 (patch)
tree5c9a7de99887bde11fd16e1bfaf2543b358f8727 /net/sctp/associola.c
parentc604e368a477ed1f7dd532605a8f1990d2b128ee (diff)
[SCTP]: Switch ->cmp_addr() and sctp_cmp_addr_exact() to net-endian.
instances of ->cmp_addr() are fine with switching both arguments to net-endian; callers other than in sctp_cmp_addr_exact() (both as ->cmp_addr(...) and direct calls of instances) adjusted; sctp_cmp_addr_exact() switched to net-endian itself and adjustment is done in its callers 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.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 83318e727905..72199d149573 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -666,10 +666,13 @@ void sctp_assoc_del_peer(struct sctp_association *asoc,
666 struct list_head *pos; 666 struct list_head *pos;
667 struct list_head *temp; 667 struct list_head *temp;
668 struct sctp_transport *transport; 668 struct sctp_transport *transport;
669 union sctp_addr tmp;
670
671 flip_to_n(&tmp, addr);
669 672
670 list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { 673 list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) {
671 transport = list_entry(pos, struct sctp_transport, transports); 674 transport = list_entry(pos, struct sctp_transport, transports);
672 if (sctp_cmp_addr_exact(addr, &transport->ipaddr_h)) { 675 if (sctp_cmp_addr_exact(&tmp, &transport->ipaddr)) {
673 /* Do book keeping for removing the peer and free it. */ 676 /* Do book keeping for removing the peer and free it. */
674 sctp_assoc_rm_peer(asoc, transport); 677 sctp_assoc_rm_peer(asoc, transport);
675 break; 678 break;
@@ -684,12 +687,14 @@ struct sctp_transport *sctp_assoc_lookup_paddr(
684{ 687{
685 struct sctp_transport *t; 688 struct sctp_transport *t;
686 struct list_head *pos; 689 struct list_head *pos;
690 union sctp_addr tmp;
687 691
692 flip_to_n(&tmp, address);
688 /* Cycle through all transports searching for a peer address. */ 693 /* Cycle through all transports searching for a peer address. */
689 694
690 list_for_each(pos, &asoc->peer.transport_addr_list) { 695 list_for_each(pos, &asoc->peer.transport_addr_list) {
691 t = list_entry(pos, struct sctp_transport, transports); 696 t = list_entry(pos, struct sctp_transport, transports);
692 if (sctp_cmp_addr_exact(address, &t->ipaddr_h)) 697 if (sctp_cmp_addr_exact(&tmp, &t->ipaddr))
693 return t; 698 return t;
694 } 699 }
695 700