diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-11-20 20:10:38 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:26:47 -0500 |
commit | 5ab7b859ab58e3479a5a66e383ecd6bc447f6c1d (patch) | |
tree | f876ff7c51eb7d5a2d3fdb8dcb97b6b19d79dde7 /net/sctp/socket.c | |
parent | 4bdf4b5fe22c26750c39fdd2939a5f33df0cc341 (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.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 3dd7ada8026c..d09589a51c44 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) | |||
313 | struct sctp_af *af; | 313 | struct sctp_af *af; |
314 | unsigned short snum; | 314 | unsigned short snum; |
315 | int ret = 0; | 315 | int ret = 0; |
316 | union sctp_addr tmp; | ||
317 | 316 | ||
318 | /* Common sockaddr verification. */ | 317 | /* Common sockaddr verification. */ |
319 | af = sctp_sockaddr_af(sp, addr, len); | 318 | 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) | |||
369 | sctp_write_lock(&ep->base.addr_lock); | 368 | sctp_write_lock(&ep->base.addr_lock); |
370 | 369 | ||
371 | /* Use GFP_ATOMIC since BHs are disabled. */ | 370 | /* Use GFP_ATOMIC since BHs are disabled. */ |
372 | flip_to_h(&tmp, addr); | 371 | ret = sctp_add_bind_addr(bp, addr, 1, GFP_ATOMIC); |
373 | ret = sctp_add_bind_addr(bp, &tmp, 1, GFP_ATOMIC); | ||
374 | sctp_write_unlock(&ep->base.addr_lock); | 372 | sctp_write_unlock(&ep->base.addr_lock); |
375 | sctp_local_bh_enable(); | 373 | sctp_local_bh_enable(); |
376 | 374 | ||
@@ -572,7 +570,6 @@ static int sctp_send_asconf_add_ip(struct sock *sk, | |||
572 | addr = (union sctp_addr *)addr_buf; | 570 | addr = (union sctp_addr *)addr_buf; |
573 | af = sctp_get_af_specific(addr->v4.sin_family); | 571 | af = sctp_get_af_specific(addr->v4.sin_family); |
574 | memcpy(&saveaddr, addr, af->sockaddr_len); | 572 | memcpy(&saveaddr, addr, af->sockaddr_len); |
575 | saveaddr.v4.sin_port = ntohs(saveaddr.v4.sin_port); | ||
576 | retval = sctp_add_bind_addr(bp, &saveaddr, 0, | 573 | retval = sctp_add_bind_addr(bp, &saveaddr, 0, |
577 | GFP_ATOMIC); | 574 | GFP_ATOMIC); |
578 | addr_buf += af->sockaddr_len; | 575 | addr_buf += af->sockaddr_len; |