diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index 6eea4ff0bd..f9d21af158 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -1916,19 +1916,8 @@ static int address_section_verify(Address *address) { address->label = mfree(address->label); } - if (in_addr_is_localhost(address->family, &address->in_addr) > 0 && - (address->family == AF_INET || !address->scope_set)) { - /* For IPv4, scope must be always RT_SCOPE_HOST. - * For IPv6, use RT_SCOPE_HOST only when it is not explicitly specified. */ - - if (address->scope_set && address->scope != RT_SCOPE_HOST) - log_warning_errno(SYNTHETIC_ERRNO(EINVAL), - "%s: non-host scope is set for localhost address. " - "Ignoring Scope= setting in the [Address] section from line %u. ", - address->section->filename, address->section->line); - + if (!address->scope_set && in_addr_is_localhost(address->family, &address->in_addr) > 0) address->scope = RT_SCOPE_HOST; - } if (address->family == AF_INET6 && !FLAGS_SET(address->duplicate_address_detection, ADDRESS_FAMILY_IPV6))