aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 20:22:43 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:27:01 -0500
commitb3f5b3b6654422bb0a6ef745fe4d11a4f01d006a (patch)
tree258b35b5b3eb721db94872f1a86806175b0a5ef4 /net/sctp/socket.c
parent74af924ab6562717ef9aab1061ec05bbbf31d979 (diff)
[SCTP]: Trivial ->ipaddr_h -> ->ipaddr conversions.
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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index d049b2ce5cf2..e527267a0536 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -3752,10 +3752,9 @@ static int sctp_getsockopt_peer_addrs_old(struct sock *sk, int len,
3752 to = (void __user *)getaddrs.addrs; 3752 to = (void __user *)getaddrs.addrs;
3753 list_for_each(pos, &asoc->peer.transport_addr_list) { 3753 list_for_each(pos, &asoc->peer.transport_addr_list) {
3754 from = list_entry(pos, struct sctp_transport, transports); 3754 from = list_entry(pos, struct sctp_transport, transports);
3755 memcpy(&temp, &from->ipaddr_h, sizeof(temp)); 3755 memcpy(&temp, &from->ipaddr, sizeof(temp));
3756 sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp); 3756 sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp);
3757 addrlen = sctp_get_af_specific(sk->sk_family)->sockaddr_len; 3757 addrlen = sctp_get_af_specific(sk->sk_family)->sockaddr_len;
3758 temp.v4.sin_port = htons(temp.v4.sin_port);
3759 if (copy_to_user(to, &temp, addrlen)) 3758 if (copy_to_user(to, &temp, addrlen))
3760 return -EFAULT; 3759 return -EFAULT;
3761 to += addrlen ; 3760 to += addrlen ;
@@ -3801,12 +3800,11 @@ static int sctp_getsockopt_peer_addrs(struct sock *sk, int len,
3801 3800
3802 list_for_each(pos, &asoc->peer.transport_addr_list) { 3801 list_for_each(pos, &asoc->peer.transport_addr_list) {
3803 from = list_entry(pos, struct sctp_transport, transports); 3802 from = list_entry(pos, struct sctp_transport, transports);
3804 memcpy(&temp, &from->ipaddr_h, sizeof(temp)); 3803 memcpy(&temp, &from->ipaddr, sizeof(temp));
3805 sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp); 3804 sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp);
3806 addrlen = sctp_get_af_specific(sk->sk_family)->sockaddr_len; 3805 addrlen = sctp_get_af_specific(sk->sk_family)->sockaddr_len;
3807 if(space_left < addrlen) 3806 if(space_left < addrlen)
3808 return -ENOMEM; 3807 return -ENOMEM;
3809 temp.v4.sin_port = htons(temp.v4.sin_port);
3810 if (copy_to_user(to, &temp, addrlen)) 3808 if (copy_to_user(to, &temp, addrlen))
3811 return -EFAULT; 3809 return -EFAULT;
3812 to += addrlen; 3810 to += addrlen;