summaryrefslogtreecommitdiffstats
path: root/ipv6.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2016-10-02 10:54:52 +0000
committerRoy Marples <roy@marples.name>2016-10-02 10:54:52 +0000
commitaccee8065cfe432d7b56b5fe039d31dd3ca41566 (patch)
tree5454a2c872c783d7fa3b899aaa07ea4effe5dcec /ipv6.c
parentf0a8b16891542f2c58af10491023a45ecbc052da (diff)
downloaddhcpcd-accee8065cfe432d7b56b5fe039d31dd3ca41566.tar.xz
The ability to add LL addresses is not dependant on using SLAAC privacy,
just the carrier being up. Fixes [c9d04817fa].
Diffstat (limited to 'ipv6.c')
-rw-r--r--ipv6.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/ipv6.c b/ipv6.c
index 3db42b21..74050a1e 100644
--- a/ipv6.c
+++ b/ipv6.c
@@ -101,21 +101,18 @@
#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)