From: Mazhar Rana <ranamazharp@gmail.com>
To: netdev@vger.kernel.org
Cc: Mazhar Rana <ranamazharp@gmail.com>,
linux-kernel@vger.kernel.org, davem@davemloft.net,
kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org,
kaber@trash.net, hannes@stressinduktion.org,
sanket.saha@cyberoam.com, mazhar.rana@cyberoam.com
Subject: [PATCH ipv6 1/1] ipv6: addrconf: do addrconf_ifdown when last ipv6 address is removed
Date: Thu, 18 Jun 2015 14:59:02 +0530 [thread overview]
Message-ID: <1434619742-10423-2-git-send-email-ranamazharp@gmail.com> (raw)
In-Reply-To: <1434619742-10423-1-git-send-email-ranamazharp@gmail.com>
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.rana@cyberoam.com>
Acked-by: Sanket Shah <sanket.shah@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
next prev parent reply other threads:[~2015-06-18 9:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-18 9:29 [PATCH ipv6 0/1] ipv6: addrconf: routes are not deleted if last ipv6 address is removed Mazhar Rana
2015-06-18 9:29 ` Mazhar Rana [this message]
2015-06-18 11:23 ` Hannes Frederic Sowa
2015-06-22 4:37 ` GMAIL
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1434619742-10423-2-git-send-email-ranamazharp@gmail.com \
--to=ranamazharp@gmail.com \
--cc=davem@davemloft.net \
--cc=hannes@stressinduktion.org \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=mazhar.rana@cyberoam.com \
--cc=netdev@vger.kernel.org \
--cc=sanket.saha@cyberoam.com \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).