Commit 40603c8b authored by Alexey Kuznetsov's avatar Alexey Kuznetsov Committed by David S. Miller

net/ipv6/mcast.c: Handle IPV6_LEAVE_GROUP with ipv6mr_interface==0

parent 1aea2e39
No related merge requests found
......@@ -141,14 +141,14 @@ int ipv6_sock_mc_drop(struct sock *sk, int ifindex, struct in6_addr *addr)
write_lock_bh(&ipv6_sk_mc_lock);
for (lnk = &np->ipv6_mc_list; (mc_lst = *lnk) !=NULL ; lnk = &mc_lst->next) {
if (mc_lst->ifindex == ifindex &&
if ((ifindex == 0 || mc_lst->ifindex == ifindex) &&
ipv6_addr_cmp(&mc_lst->addr, addr) == 0) {
struct net_device *dev;
*lnk = mc_lst->next;
write_unlock_bh(&ipv6_sk_mc_lock);
if ((dev = dev_get_by_index(ifindex)) != NULL) {
if ((dev = dev_get_by_index(mc_lst->ifindex)) != NULL) {
ipv6_dev_mc_dec(dev, &mc_lst->addr);
dev_put(dev);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment