Commit 9d49c406 authored by Hideaki Yoshifuji's avatar Hideaki Yoshifuji

[IPV6] Fix device multicast list leakage when forwarding is on.

We failed to leave all-routers multicast address.
Signed-off-by: default avatarHideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
parent 0dd3a3bc
......@@ -2110,6 +2110,11 @@ void ipv6_mc_destroy_dev(struct inet6_dev *idev)
*/
__ipv6_dev_mc_dec(idev->dev, idev, &maddr);
if (idev->cnf.forwarding) {
ipv6_addr_all_routers(&maddr);
__ipv6_dev_mc_dec(idev->dev, idev, &maddr);
}
write_lock_bh(&idev->lock);
while ((i = idev->mc_list) != NULL) {
idev->mc_list = i->next;
......
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