diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-04-20 15:32:24 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-04-22 16:06:20 +0200 |
commit | fa7099927c87b91804c6cc5ec3a3d8f8b6ba9ada (patch) | |
tree | 56c96a4a548db75955f5ba6d1c37fb44340e3648 /src/network | |
parent | 291d565a04263452c03beaf537773ade4f0b1617 (diff) |
networkd: consider various IPv6 features as disabled if IPv6 is not available in the kernel
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/networkd-link.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 5cdf123652..5101d553d5 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -42,6 +42,9 @@ static bool link_dhcp6_enabled(Link *link) { assert(link); + if (!socket_ipv6_is_supported()) + return false; + if (link->flags & IFF_LOOPBACK) return false; @@ -90,6 +93,9 @@ static bool link_ipv4ll_enabled(Link *link) { static bool link_ipv6ll_enabled(Link *link) { assert(link); + if (!socket_ipv6_is_supported()) + return false; + if (link->flags & IFF_LOOPBACK) return false; @@ -192,6 +198,9 @@ static bool link_proxy_arp_enabled(Link *link) { static bool link_ipv6_accept_ra_enabled(Link *link) { assert(link); + if (!socket_ipv6_is_supported()) + return false; + if (link->flags & IFF_LOOPBACK) return false; @@ -214,6 +223,7 @@ static bool link_ipv6_accept_ra_enabled(Link *link) { } static IPv6PrivacyExtensions link_ipv6_privacy_extensions(Link *link) { + assert(link); if (!socket_ipv6_is_supported()) return _IPV6_PRIVACY_EXTENSIONS_INVALID; |