mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
network/address: always set IFA_ADDRESS attribute for IPv6 address on configure
IPv6 address can update the peer address without removing the address. If an address have a peer, but now we want to drop the peer, we need to specify a null address in IFA_ADDRESS attribute. IPv4 address cannot update the peer address, so let's specify peer address only when necessary.
This commit is contained in:
@@ -1256,7 +1256,7 @@ static int address_configure(const Address *address, const struct ifa_cacheinfo
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (in_addr_is_set(address->family, &address->in_addr_peer)) {
|
||||
if (address->family == AF_INET6 || in_addr_is_set(address->family, &address->in_addr_peer)) {
|
||||
r = netlink_message_append_in_addr_union(m, IFA_ADDRESS, address->family, &address->in_addr_peer);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
Reference in New Issue
Block a user