networkd: assume no link local addresses for where it isn't used
authorJason A. Donenfeld <Jason@zx2c4.com>
Fri, 26 Jan 2018 14:34:09 +0000 (15:34 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 26 Jan 2018 14:41:17 +0000 (15:41 +0100)
It turns out that link local doesn't make much sense in its context.
Since link local is disabled by the kernel driver, it's important that
networkd assumes it's off too, so that the link can reach the
"configured" stage, without waiting indefinitely for link local
addresses which will never come.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
src/network/networkd-link.c

index 616f14b..64c4508 100644 (file)
@@ -92,6 +92,9 @@ static bool link_ipv4ll_enabled(Link *link) {
         if (!link->network)
                 return false;
 
+        if (streq_ptr(link->kind, "wireguard"))
+                return false;
+
         return link->network->link_local & ADDRESS_FAMILY_IPV4;
 }
 
@@ -107,6 +110,9 @@ static bool link_ipv6ll_enabled(Link *link) {
         if (!link->network)
                 return false;
 
+        if (streq_ptr(link->kind, "wireguard"))
+                return false;
+
         return link->network->link_local & ADDRESS_FAMILY_IPV6;
 }