From: Stephen Hemminger <shemminger@vyatta.com>
To: Brian Haley <brian.haley@hp.com>
Cc: "David Miller" <davem@davemloft.net>,
"YOSHIFUJI Hideaki / 吉藤英明" <yoshfuji@linux-ipv6.org>,
netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] IPv6: keep permanent addresses on admin down
Date: Tue, 9 Feb 2010 08:36:59 -0800 [thread overview]
Message-ID: <20100209083659.16b0961a@nehalam> (raw)
In-Reply-To: <4B7173CB.3020506@hp.com>
On Tue, 09 Feb 2010 09:40:11 -0500
Brian Haley <brian.haley@hp.com> wrote:
> Stephen Hemminger wrote:
> > @@ -2686,18 +2687,30 @@ static int addrconf_ifdown(struct net_de
> > write_lock_bh(&idev->lock);
> > }
> > #endif
> > - while ((ifa = idev->addr_list) != NULL) {
> > - idev->addr_list = ifa->if_next;
> > - ifa->if_next = NULL;
> > - ifa->dead = 1;
> > - addrconf_del_timer(ifa);
> > - write_unlock_bh(&idev->lock);
> > -
> > - __ipv6_ifa_notify(RTM_DELADDR, ifa);
> > - atomic_notifier_call_chain(&inet6addr_chain, NETDEV_DOWN, ifa);
> > - in6_ifa_put(ifa);
> > + bifa = &idev->addr_list;
> > + while ((ifa = *bifa) != NULL) {
> > + if (how == 0 && (ifa->flags&IFA_F_PERMANENT)) {
> > + /* Retain permanent address on admin down */
> > + bifa = &ifa->if_next;
> > +
> > + /* Restart DAD if needed when link comes back up */
> > + if ( !((dev->flags&(IFF_NOARP|IFF_LOOPBACK)) ||
> > + idev->cnf.accept_dad <= 0 ||
> > + (ifa->flags & IFA_F_NODAD)))
> > + ifa->flags |= IFA_F_TENTATIVE;
> > + } else {
> > + *bifa = ifa->if_next;
> > + ifa->if_next = NULL;
> > +
> > + ifa->dead = 1;
> > + write_unlock_bh(&idev->lock);
> > +
> > + __ipv6_ifa_notify(RTM_DELADDR, ifa);
> > + atomic_notifier_call_chain(&inet6addr_chain, NETDEV_DOWN, ifa);
> > + in6_ifa_put(ifa);
> >
> > - write_lock_bh(&idev->lock);
> > + write_lock_bh(&idev->lock);
> > + }
>
> What about addrconf_del_timer()? It didn't seem to make it to this else{} from
> the original.
>
> -Brian
addrconf_del_timer is already being done earlier in same code
no need to do it twice.
--
next prev parent reply other threads:[~2010-02-09 16:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-09 5:48 [PATCH 1/2] IPv6: keep permanent addresses on admin down Stephen Hemminger
2010-02-09 5:48 ` [PATCH 2/2] IPv6: remove trivial nested _bh suffix Stephen Hemminger
2010-02-12 20:30 ` David Miller
2010-02-09 14:40 ` [PATCH 1/2] IPv6: keep permanent addresses on admin down Brian Haley
2010-02-09 16:36 ` Stephen Hemminger [this message]
2010-02-12 20:30 ` David Miller
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=20100209083659.16b0961a@nehalam \
--to=shemminger@vyatta.com \
--cc=brian.haley@hp.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--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).