diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index d1087c5f123..2aa8c88bb2d 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -516,7 +516,7 @@ static int address_compare_func(const Address *a1, const Address *a2) { } } -static bool address_can_update(const Address *existing, const Address *requesting) { +bool address_can_update(const Address *existing, const Address *requesting) { assert(existing); assert(requesting); diff --git a/src/network/networkd-address.h b/src/network/networkd-address.h index cc2429094e7..350d2f6b381 100644 --- a/src/network/networkd-address.h +++ b/src/network/networkd-address.h @@ -85,6 +85,8 @@ void link_get_address_states( extern const struct hash_ops address_hash_ops; +bool address_can_update(const Address *existing, const Address *requesting); + Address* address_ref(Address *address); Address* address_unref(Address *address); diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c index eb1420be5c0..de4588c93e0 100644 --- a/src/network/networkd-dhcp6.c +++ b/src/network/networkd-dhcp6.c @@ -158,8 +158,7 @@ static int verify_dhcp6_address(Link *link, const Address *address) { } else log_level = LOG_DEBUG; - if (address->prefixlen == existing->prefixlen) - /* Currently, only conflict in prefix length is reported. */ + if (address_can_update(existing, address)) goto simple_log; if (existing->source == NETWORK_CONFIG_SOURCE_NDISC)