Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 May 2011 11:38:24 +0900 (JST)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        mrmullemeck@gmail.com
Cc:        freebsd-net@FreeBSD.org
Subject:   Re: rtsol set IFF_UP when started - why?
Message-ID:  <20110525.113824.427376659208697618.hrs@allbsd.org>
In-Reply-To: <BANLkTin7=UU9XPZNN3myfGcKh6qmdXr0VA@mail.gmail.com>
References:  <BANLkTin7=UU9XPZNN3myfGcKh6qmdXr0VA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
----Security_Multipart(Wed_May_25_11_38_24_2011_588)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

MrMulleMeck <mrmullemeck@gmail.com> wrote
  in <BANLkTin7=UU9XPZNN3myfGcKh6qmdXr0VA@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

----Security_Multipart(Wed_May_25_11_38_24_2011_588)--
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEABECAAYFAk3ca6AACgkQTyzT2CeTzy0BqgCdH9kQUGSZ4I5CbruTaHrDigX9
/1oAn0BDZwbOvdghMXTwNNG18eZKr1wh
=0+ON
-----END PGP SIGNATURE-----

----Security_Multipart(Wed_May_25_11_38_24_2011_588)----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110525.113824.427376659208697618.hrs>