From: Erik Kline <ek@google.com>
To: Lorenzo Colitti <lorenzo@google.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>,
Hannes Frederic Sowa <hannes@stressinduktion.org>
Subject: Re: [PATCH net] net: ipv6: allow explicitly choosing optimistic addresses
Date: Tue, 16 Dec 2014 19:38:17 +0900 [thread overview]
Message-ID: <CAAedzxqGhOFJC3DgzgHukr4xOy4YDC_ckoGq9hcLCsSxx2947A@mail.gmail.com> (raw)
In-Reply-To: <CAKD1Yr3+S81mKbVdQ-P6byx-e2Hfn8GJz+Jr7SLWrRjkfpD2qA@mail.gmail.com>
On Fri, Dec 12, 2014 at 4:37 PM, Lorenzo Colitti <lorenzo@google.com> wrote:
> On Fri, Dec 12, 2014 at 12:50 PM, Erik Kline <ek@google.com> wrote:
>>
>> @@ -1527,7 +1527,8 @@ int ipv6_chk_addr(struct net *net, const struct in6_addr *addr,
>> if (!net_eq(dev_net(ifp->idev->dev), net))
>> continue;
>> if (ipv6_addr_equal(&ifp->addr, addr) &&
>> - !(ifp->flags&IFA_F_TENTATIVE) &&
>> + (!(ifp->flags&IFA_F_TENTATIVE) ||
>> + ifp->flags&IFA_F_OPTIMISTIC) &&
>> (dev == NULL || ifp->idev->dev == dev ||
>> !(ifp->scope&(IFA_LINK|IFA_HOST) || strict))) {
>> rcu_read_unlock_bh();
>
> I looked at the callers of ipv6_chk_addr (lxr finds 19 files); from
> what I saw, this change will make all of them more correct except for
> ndisc_solicit. With this change, ndisc_solicit could now send
> neighbour solicitations from optimistic addresses, which is not
> allowed by the RFC.
True. I have a version that fixes this, but ended up splitting
ipv6_chk_addr into two:
- ipv6_chk_addr (same as today), and
- ipv6_chk_addr_and_flags (which takes a "u32 banned_flags" argument)
The ugliness of this naming is not lost on me. I briefly tried a
version that reuses the "strict" argument to achieve the same thing,
but that doesn't seem to be quite correct in all cases either.
next prev parent reply other threads:[~2014-12-16 10:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1418356200-7457-1-git-send-email-ek@google.com>
2014-12-12 7:37 ` [PATCH net] net: ipv6: allow explicitly choosing optimistic addresses Lorenzo Colitti
2014-12-16 10:38 ` Erik Kline [this message]
2015-01-21 7:02 Erik Kline
2015-01-25 12:46 ` Hannes Frederic Sowa
2015-01-28 12:03 ` Erik Kline
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=CAAedzxqGhOFJC3DgzgHukr4xOy4YDC_ckoGq9hcLCsSxx2947A@mail.gmail.com \
--to=ek@google.com \
--cc=hannes@stressinduktion.org \
--cc=lorenzo@google.com \
--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).