networkd: assume no link local addresses for where it isn't used

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>
This commit is contained in:
Jason A. Donenfeld 2018-01-26 15:34:09 +01:00
parent dba081db31
commit a8f5bba6a0
1 changed files with 6 additions and 0 deletions

View 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;
}