aboutsummaryrefslogtreecommitdiff
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 17:10:38 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-02 21:26:47 -0800
commit5ab7b859ab58e3479a5a66e383ecd6bc447f6c1d (patch)
treef876ff7c51eb7d5a2d3fdb8dcb97b6b19d79dde7 /net/sctp/socket.c
parent4bdf4b5fe22c26750c39fdd2939a5f33df0cc341 (diff)
[SCTP]: Switch sctp_add_bind_addr() to net-endian.
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 3dd7ada8026..d09589a51c4 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -313,7 +313,6 @@ SCTP_STATIC int sctp_do_bind(struct sock *sk, union sctp_addr *addr, int len)
struct sctp_af *af;
unsigned short snum;
int ret = 0;
- union sctp_addr tmp;
/* Common sockaddr verification. */
af = sctp_sockaddr_af(sp, addr, len);
@@ -369,8 +368,7 @@ SCTP_STATIC int sctp_do_bind(struct sock *sk, union sctp_addr *addr, int len)
sctp_write_lock(&ep->base.addr_lock);
/* Use GFP_ATOMIC since BHs are disabled. */
- flip_to_h(&tmp, addr);
- ret = sctp_add_bind_addr(bp, &tmp, 1, GFP_ATOMIC);
+ ret = sctp_add_bind_addr(bp, addr, 1, GFP_ATOMIC);
sctp_write_unlock(&ep->base.addr_lock);
sctp_local_bh_enable();
@@ -572,7 +570,6 @@ static int sctp_send_asconf_add_ip(struct sock *sk,
addr = (union sctp_addr *)addr_buf;
af = sctp_get_af_specific(addr->v4.sin_family);
memcpy(&saveaddr, addr, af->sockaddr_len);
- saveaddr.v4.sin_port = ntohs(saveaddr.v4.sin_port);
retval = sctp_add_bind_addr(bp, &saveaddr, 0,
GFP_ATOMIC);
addr_buf += af->sockaddr_len;