From: Yu Watanabe Date: Sat, 4 May 2019 09:16:12 +0000 (+0200) Subject: network: disable fallback IPv4ll address assignment when DHCPv4 is disabled X-Git-Tag: v243-rc1~488^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=29e81083bd2fcb2dbf83f67ef358c7d25adf7e9d;p=thirdparty%2Fsystemd.git network: disable fallback IPv4ll address assignment when DHCPv4 is disabled --- diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index 1828d1126c0..66cce13e31e 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -236,6 +236,13 @@ 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_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. " + "Disabling the fallback assignment.", network->filename); + SET_FLAG(network->link_local, ADDRESS_FAMILY_FALLBACK_IPV4, false); + } + if (network->ipv6_accept_ra < 0 && network->bridge) network->ipv6_accept_ra = false;