rtsol set IFF_UP when started - why?

Hiroki Sato hrs at FreeBSD.org
Wed May 25 02:38:52 UTC 2011


MrMulleMeck <mrmullemeck at gmail.com> wrote
  in <BANLkTin7=UU9XPZNN3myfGcKh6qmdXr0VA at mail.gmail.com>:

mr> When rtsol(d) starts, it check the interface status (flags). If flags
mr> are not (IFF_UP|IFF_RUNNING) rtsol concludes the interface is "not
mr> active". However, immediately after this, rtsol will activate/set the
mr> IFF_UP flag (if not set) causing DAD to start. Let say that the link
mr> is not ready yet (but in a short period of time) when rtsold starts,
mr> wouldn't this cause DAD to believe that the address is OK (no response
mr> since RS messages are actually never sent over the wire)?

 DAD code assumes a link is ready when IFF_UP && IFF_DRV_RUNNING.  In
 the case that a link is actually down even if IFF_DRV_RUNNING, DAD
 probing messages will be sent and can be lost.

mr> What is the rationale (if any) for rtsol to set the IFF_UP flag? It
mr> seems that rtsold will wait anyway for DAD later on?

 Simply because rtsol needs to activate the specified interface if it
 is down.  As explained above, DAD code in the kernel will wait for
 IFF_DRV_RUNNING after IFF_UP.

-- Hiroki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20110525/23997ca3/attachment.pgp


More information about the freebsd-net mailing list