1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-13 17:18:18 +03:00

network/dhcp6: use address_can_update() at one more place

In address_can_update(), only prefix length is checked for IPv6
addresses. So, this should not change any behavior.
This commit is contained in:
Yu Watanabe 2024-02-14 13:27:00 +09:00
parent a45e1c35e3
commit 77de62f96c
3 changed files with 4 additions and 3 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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)