diff options
-rw-r--r-- | net/ipv6/mcast.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 6d0f5dc8e3a6..92f8e48e4ba4 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
@@ -211,6 +211,9 @@ int ipv6_sock_mc_drop(struct sock *sk, int ifindex, const struct in6_addr *addr) | |||
211 | struct ipv6_mc_socklist __rcu **lnk; | 211 | struct ipv6_mc_socklist __rcu **lnk; |
212 | struct net *net = sock_net(sk); | 212 | struct net *net = sock_net(sk); |
213 | 213 | ||
214 | if (!ipv6_addr_is_multicast(addr)) | ||
215 | return -EINVAL; | ||
216 | |||
214 | spin_lock(&ipv6_sk_mc_lock); | 217 | spin_lock(&ipv6_sk_mc_lock); |
215 | for (lnk = &np->ipv6_mc_list; | 218 | for (lnk = &np->ipv6_mc_list; |
216 | (mc_lst = rcu_dereference_protected(*lnk, | 219 | (mc_lst = rcu_dereference_protected(*lnk, |