]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
The ability to add LL addresses is not dependant on using SLAAC privacy,
authorRoy Marples <roy@marples.name>
Sun, 2 Oct 2016 10:54:52 +0000 (10:54 +0000)
committerRoy Marples <roy@marples.name>
Sun, 2 Oct 2016 10:54:52 +0000 (10:54 +0000)
just the carrier being up.

Fixes [c9d04817fa].

ipv6.c

diff --git a/ipv6.c b/ipv6.c
index 3db42b210e2823846b638f8f7b27ce4775479d0d..74050a1e0365936025690c493a5df59d36f186fa 100644 (file)
--- a/ipv6.c
+++ b/ipv6.c
 
 #if defined(HAVE_IN6_ADDR_GEN_MODE_NONE) || defined(ND6_IFF_AUTO_LINKLOCAL) || \
     defined(IFF_NOLINKLOCAL)
-/* If we're using a private SLAAC address on wireless,
- * don't add it until we have associated as we randomise
- * it based on the SSID. */
+/* Only add the LL address if we have a carrier, so DaD works. */
 #define        CAN_ADD_LLADDR(ifp) \
-       (!((ifp)->options->options & DHCPCD_SLAACPRIVATE) || \
-           (ifp)->carrier != LINK_DOWN)
+    (!((ifp)->options->options & DHCPCD_LINK) || (ifp)->carrier != LINK_DOWN)
 #ifdef __sun
-/* Although we can add our own LL addr, we cannot drop it
+/* Although we can add our own LL address, we cannot drop it
  * without unplumbing the if which is a lot of code.
  * So just keep it for the time being. */
 #define        CAN_DROP_LLADDR(ifp)    (0)
 #else
 #define        CAN_DROP_LLADDR(ifp)    (1)
 #endif
-#elif __NetBSD__
+#elif defined(__NetBSD__)
 /* Earlier versions of NetBSD don't add duplicate LLADDR's if the interface
  * is brought up and one already exists. */
 #define        CAN_ADD_LLADDR(ifp)     (1)