1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00

network: introduce ipv4acd_set_ifname()

This commit is contained in:
Yu Watanabe 2021-09-08 14:08:13 +09:00
parent fccf662c3f
commit 86173383a3
3 changed files with 19 additions and 6 deletions

View File

@ -288,3 +288,18 @@ int ipv4acd_stop(Link *link) {
return r;
}
int ipv4acd_set_ifname(Link *link) {
Address *address;
int r;
assert(link);
SET_FOREACH(address, link->addresses_ipv4acd) {
r = sd_ipv4acd_set_ifname(address->acd, link->ifname);
if (r < 0)
return r;
}
return 0;
}

View File

@ -8,3 +8,4 @@ int ipv4acd_address_is_ready_to_configure(Link *link, const Address *address);
int ipv4acd_update_mac(Link *link);
int ipv4acd_start(Link *link);
int ipv4acd_stop(Link *link);
int ipv4acd_set_ifname(Link *link);

View File

@ -2276,12 +2276,9 @@ static int link_update_name(Link *link, sd_netlink_message *message) {
return log_link_debug_errno(link, r, "Failed to update interface name in IPv4LL client: %m");
}
Address *a;
SET_FOREACH(a, link->addresses_ipv4acd) {
r = sd_ipv4acd_set_ifname(a->acd, link->ifname);
if (r < 0)
return log_link_debug_errno(link, r, "Failed to update interface name in IPv4ACD client: %m");
}
r = ipv4acd_set_ifname(link);
if (r < 0)
return log_link_debug_errno(link, r, "Failed to update interface name in IPv4ACD client: %m");
return 0;
}