After 'commit 876fd05ddbae03166e7037fca957b55bb3be6594 ("ipv6: don't disable interface if last ipv6 address is removed")' it is not clearing ipv6 interface configurations(routes, neighbours, etc) when last ipv6 address of interface is removed.
This patch will call addrconf_ifdown when last ipv6 address of interface is removed to clear ipv6 interface configurations. This will not delete /proc/sys/net/ipv6/conf/<interface> directory. Signed-off-by: Mazhar Rana <mazhar.r...@cyberoam.com> Acked-by: Sanket Shah <sanket.s...@cyberoam.com> --- net/ipv6/addrconf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 37b70e8..230452c 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -2678,6 +2678,8 @@ static int inet6_addr_del(struct net *net, int ifindex, u32 ifa_flags, ipv6_mc_config(net->ipv6.mc_autojoin_sk, false, pfx, dev->ifindex); } + if (list_empty(&idev->addr_list)) + addrconf_ifdown(idev->dev, 0); return 0; } } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html