summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-08-27 23:45:00 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-08-27 23:53:46 +0900
commit44013aa4f57c1a5ac7766a3a7cd719d912deb245 (patch)
treee1708760ddcde98bc49f77168262ba8f5c3cadfb
parentadfeee49c5386c44642361baf7234d40aac5082c (diff)
downloadsystemd-44013aa4f57c1a5ac7766a3a7cd719d912deb245.tar.gz
network: add more warnings in network_verify()
-rw-r--r--src/network/networkd-network.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index 91326cea3b..2b8d0eb2fb 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -220,6 +220,26 @@ int network_verify(Network *network) {
if (network->link_local < 0)
network->link_local = network->bridge ? ADDRESS_FAMILY_NO : ADDRESS_FAMILY_IPV6;
+ if (!FLAGS_SET(network->link_local, ADDRESS_FAMILY_IPV6)) {
+ if (network->ipv6_accept_ra > 0) {
+ log_warning("%s: IPv6AcceptRA= is enabled by the .network file but IPv6 link local addressing is disabled. "
+ "Disabling IPv6AcceptRA=.", network->filename);
+ network->ipv6_accept_ra = false;
+ }
+
+ if (FLAGS_SET(network->dhcp, ADDRESS_FAMILY_IPV6)) {
+ log_warning("%s: DHCPv6 client is enabled by the .network file but IPv6 link local addressing is disabled. "
+ "Disabling DHCPv6 client.", network->filename);
+ SET_FLAG(network->dhcp, ADDRESS_FAMILY_IPV6, false);
+ }
+
+ if (network->router_prefix_delegation != RADV_PREFIX_DELEGATION_NONE) {
+ log_warning("%s: IPv6PrefixDelegation= is enabled but IPv6 link local addressing is disabled. "
+ "Disabling IPv6PrefixDelegation=.", network->filename);
+ network->router_prefix_delegation = RADV_PREFIX_DELEGATION_NONE;
+ }
+ }
+
if (FLAGS_SET(network->link_local, ADDRESS_FAMILY_FALLBACK_IPV4) &&
!FLAGS_SET(network->dhcp, ADDRESS_FAMILY_IPV4)) {
log_warning("%s: fallback assignment of IPv4 link local address is enabled but DHCPv4 is disabled. "