aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/socket.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/socket.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/socket.c')
-rw-r--r--net/sctp/socket.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 459f32c5c3ae..e03ba9055eb1 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -693,7 +693,6 @@ static int sctp_send_asconf_del_ip(struct sock *sk,
693 struct sctp_bind_addr *bp; 693 struct sctp_bind_addr *bp;
694 struct sctp_chunk *chunk; 694 struct sctp_chunk *chunk;
695 union sctp_addr *laddr; 695 union sctp_addr *laddr;
696 union sctp_addr saveaddr;
697 void *addr_buf; 696 void *addr_buf;
698 struct sctp_af *af; 697 struct sctp_af *af;
699 struct list_head *pos, *pos1; 698 struct list_head *pos, *pos1;
@@ -773,13 +772,11 @@ static int sctp_send_asconf_del_ip(struct sock *sk,
773 for (i = 0; i < addrcnt; i++) { 772 for (i = 0; i < addrcnt; i++) {
774 laddr = (union sctp_addr *)addr_buf; 773 laddr = (union sctp_addr *)addr_buf;
775 af = sctp_get_af_specific(laddr->v4.sin_family); 774 af = sctp_get_af_specific(laddr->v4.sin_family);
776 memcpy(&saveaddr, laddr, af->sockaddr_len);
777 saveaddr.v4.sin_port = ntohs(saveaddr.v4.sin_port);
778 list_for_each(pos1, &bp->address_list) { 775 list_for_each(pos1, &bp->address_list) {
779 saddr = list_entry(pos1, 776 saddr = list_entry(pos1,
780 struct sctp_sockaddr_entry, 777 struct sctp_sockaddr_entry,
781 list); 778 list);
782 if (sctp_cmp_addr_exact(&saddr->a_h, &saveaddr)) 779 if (sctp_cmp_addr_exact(&saddr->a, laddr))
783 saddr->use_as_src = 0; 780 saddr->use_as_src = 0;
784 } 781 }
785 addr_buf += af->sockaddr_len; 782 addr_buf += af->sockaddr_len;