diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2010-04-30 21:42:42 -0400 |
---|---|---|
committer | Vlad Yasevich <vladislav.yasevich@hp.com> | 2010-04-30 21:42:42 -0400 |
commit | a5f4cea74f1397bb29d0bbdabeb05bd05a23a741 (patch) | |
tree | 7810a501cb7936897f59970ceb0d1170ba30526a /net | |
parent | 83d7eb2979cd3390c375470225dd2d8f2009bc70 (diff) | |
download | linux-stable-a5f4cea74f1397bb29d0bbdabeb05bd05a23a741.tar.gz linux-stable-a5f4cea74f1397bb29d0bbdabeb05bd05a23a741.tar.bz2 linux-stable-a5f4cea74f1397bb29d0bbdabeb05bd05a23a741.zip |
sctp: Use correct address family in sctp_getsockopt_peer_addrs()
The function should use the address family of the address when
trying to determine the length of the structure.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sctp/socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 13d8229f3a9c..1282a0ed855e 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -4384,7 +4384,7 @@ static int sctp_getsockopt_peer_addrs(struct sock *sk, int len, transports) { memcpy(&temp, &from->ipaddr, sizeof(temp)); sctp_get_pf_specific(sk->sk_family)->addr_v4map(sp, &temp); - addrlen = sctp_get_af_specific(sk->sk_family)->sockaddr_len; + addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; if (space_left < addrlen) return -ENOMEM; if (copy_to_user(to, &temp, addrlen)) |