diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-04-28 07:40:55 +0200 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-06-12 02:19:08 +0200 |
commit | 20c61fbd8deb2ada0ac3acecf6156a986dbfff2d (patch) | |
tree | 0be06a3736b60a6c3586e39dbc43031a2e3dace7 /net | |
parent | Merge branch 'davem-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jga... (diff) | |
download | linux-20c61fbd8deb2ada0ac3acecf6156a986dbfff2d.tar.xz linux-20c61fbd8deb2ada0ac3acecf6156a986dbfff2d.zip |
ipv6 mcast: Check address family of gf_group in getsockopt(MS_FILTER).
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net')
-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, return -EINVAL; if (copy_from_user(&gsf, optval, GROUP_FILTER_SIZE(0))) return -EFAULT; + if (gsf.gf_group.ss_family != AF_INET6) + return -EADDRNOTAVAIL; lock_sock(sk); err = ip6_mc_msfget(sk, &gsf, (struct group_filter __user *)optval, optlen); |