[arch-projects] [netctl][patch] Remove DAD detection

Jouke Witteveen j.witteveen at gmail.com
Fri Feb 8 11:16:13 EST 2013


On Fri, Feb 8, 2013 at 1:03 AM, Sébastien Luttringer <seblu at seblu.net> wrote:
> On Thu, Feb 7, 2013 at 12:36 PM, Jouke Witteveen <j.witteveen at gmail.com> wrote:
>> On Wed, Feb 6, 2013 at 11:48 PM, Sébastien Luttringer <seblu at seblu.net> wrote:
>>> DAD detection is detected via the presence of tentative flag in ip command.
>>> This flag can only be setted if interface is up (obviously).
>>>
>>> So, setting an IPv6 address will fail when you:
>>> - the cable is not plugged
>>> - any interface of a bridge is not set
>>>
>>> The code was (before rewriting of netctl) reference this bug report:
>>> https://bugs.archlinux.org/task/28887
>>
>> This bug will reopen after your proposed changes.
> I don't think so. The bug was about DAD no waiting enough time. This
> patch drop the DAD check logic by userland (same behaviour than ipv4).

The lines you delete are exactly the lines that were added to fix the bug.

>> If the cable is not plugged there is no point in trying to connect anyway
> Connect, but configure? Setting a IP address to an interface doesn't
> mean trying to connect to anything or having an internet connection.
> It just mean setting an ip.
> Port can be up or down, or change of states every minutes. We don't
> care. netctl should not fail to setup a static ip on iface when no
> link is detected at boot.
> Sometimes, setting an IP on iface can be used to allow kernel to
> accept packet to this destination without really own it (lvs by
> example)
>
>> so it would be nice if you describe in some more detail what problem your changes solve.
> Imagine a router on archlinux, with a bridge of n ports. People can
> plug (or not) their computers when they wants. Mostly, when you boot
> your router, noboby is plugged.
> When the router starts, it defines IPv4 and IPv6 on the bridge (where
> all ethernet ports are added).
> With the current netcfg/netctl, it's impossible because when nobody is
> plugged, DAD cannot do is job of checking ip address, because all the
> underlying interface can't send icmpv6 ND messages.
>
> I've tested to disable dad (sysctl accept_dad)[1] but interface stay
> in tentative mode and netctl timeout and rollback configuration.[2]

The way to prevent your interface from entering the 'tentative' state
is by specifying addresses as follows:

Address6=('1234:bcd::11/64 nodad')

I will soon add a note on such modifiers to the manual.

> Here I don't see why we *care* about DAD when setting ipv6 in _static_
> mode. This is really usefull (and required) in stateless mode and was
> defined in ND RFC[3] for stateless autoconfig RFC[4].
>
> If you really want check DAD, which is a completly correct behaviour
> in stateless, we maybe use dadfailed[5] instead of tentative[6] in our
> check.
>
> Cheers,
>
> [1] Not really surprising as parameter is about accept and not using
> DAD crafted ND.
> [2] There is currently no check in the netcfg code about activating or
> not the sysctl accept_dad. Should we add it as we do with accept_ra?
> [3] http://tools.ietf.org/html/rfc4861 look at §7
> [4] http://tools.ietf.org/html/rfc4862
> [5] http://git.kernel.org/?p=linux/kernel/git/shemminger/iproute2.git;a=commit;h=f4af851bac12b0a72515912d6e1458d41aa2e009
> [6] http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob;f=net/ipv6/addrconf.c;h=420e563263840442a150c13098148921559c3f2d;hb=HEAD#l1297
>
> --
> Sébastien "Seblu" Luttringer
> https://www.seblu.net
> GPG: 0x2072D77A


More information about the arch-projects mailing list