diff options
Diffstat (limited to 'net/ipv6/ipv6_sockglue.c')
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 26b83e512a09..ce794d6acb70 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -874,6 +874,8 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, | |||
874 | return -EINVAL; | 874 | return -EINVAL; |
875 | if (copy_from_user(&gsf, optval, GROUP_FILTER_SIZE(0))) | 875 | if (copy_from_user(&gsf, optval, GROUP_FILTER_SIZE(0))) |
876 | return -EFAULT; | 876 | return -EFAULT; |
877 | if (gsf.gf_group.ss_family != AF_INET6) | ||
878 | return -EADDRNOTAVAIL; | ||
877 | lock_sock(sk); | 879 | lock_sock(sk); |
878 | err = ip6_mc_msfget(sk, &gsf, | 880 | err = ip6_mc_msfget(sk, &gsf, |
879 | (struct group_filter __user *)optval, optlen); | 881 | (struct group_filter __user *)optval, optlen); |