diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-11-20 20:07:06 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:26:37 -0500 |
commit | be29681edfbad72167df735e243e8621840dca4f (patch) | |
tree | efc92cc3520bfc222200d82f561ccb84c9f7c5d0 /net/sctp/socket.c | |
parent | 38a03145efcdbbcc60465fdffc0546208a52daf8 (diff) |
[SCTP]: Switch sctp_assoc_lookup_paddr() to net-endian.
Callers updated.
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, 3 insertions, 2 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index d42953efa355..ffdad8e842ac 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -1370,7 +1370,7 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
1370 | struct sctp_association *new_asoc=NULL, *asoc=NULL; | 1370 | struct sctp_association *new_asoc=NULL, *asoc=NULL; |
1371 | struct sctp_transport *transport, *chunk_tp; | 1371 | struct sctp_transport *transport, *chunk_tp; |
1372 | struct sctp_chunk *chunk; | 1372 | struct sctp_chunk *chunk; |
1373 | union sctp_addr to; | 1373 | union sctp_addr to, tmp; |
1374 | struct sockaddr *msg_name = NULL; | 1374 | struct sockaddr *msg_name = NULL; |
1375 | struct sctp_sndrcvinfo default_sinfo = { 0 }; | 1375 | struct sctp_sndrcvinfo default_sinfo = { 0 }; |
1376 | struct sctp_sndrcvinfo *sinfo; | 1376 | struct sctp_sndrcvinfo *sinfo; |
@@ -1424,6 +1424,7 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
1424 | if (msg_namelen > sizeof(to)) | 1424 | if (msg_namelen > sizeof(to)) |
1425 | msg_namelen = sizeof(to); | 1425 | msg_namelen = sizeof(to); |
1426 | memcpy(&to, msg->msg_name, msg_namelen); | 1426 | memcpy(&to, msg->msg_name, msg_namelen); |
1427 | memcpy(&tmp, msg->msg_name, msg_namelen); | ||
1427 | SCTP_DEBUG_PRINTK("Just memcpy'd. msg_name is " | 1428 | SCTP_DEBUG_PRINTK("Just memcpy'd. msg_name is " |
1428 | "0x%x:%u.\n", | 1429 | "0x%x:%u.\n", |
1429 | to.v4.sin_addr.s_addr, to.v4.sin_port); | 1430 | to.v4.sin_addr.s_addr, to.v4.sin_port); |
@@ -1691,7 +1692,7 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
1691 | */ | 1692 | */ |
1692 | if ((sctp_style(sk, TCP) && msg_name) || | 1693 | if ((sctp_style(sk, TCP) && msg_name) || |
1693 | (sinfo_flags & SCTP_ADDR_OVER)) { | 1694 | (sinfo_flags & SCTP_ADDR_OVER)) { |
1694 | chunk_tp = sctp_assoc_lookup_paddr(asoc, &to); | 1695 | chunk_tp = sctp_assoc_lookup_paddr(asoc, &tmp); |
1695 | if (!chunk_tp) { | 1696 | if (!chunk_tp) { |
1696 | err = -EINVAL; | 1697 | err = -EINVAL; |
1697 | goto out_free; | 1698 | goto out_free; |