summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-address.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/networkd-address.c')
-rw-r--r--src/network/networkd-address.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index e2e448b44f..c1a8cd884a 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -1669,7 +1669,7 @@ int manager_rtnl_process_address(sd_netlink *rtnl, sd_netlink_message *message,
uint16_t type;
Address *address = NULL;
Request *req = NULL;
- bool is_new = false;
+ bool is_new = false, update_dhcp4;
int ifindex, r;
assert(rtnl);
@@ -1778,6 +1778,8 @@ int manager_rtnl_process_address(sd_netlink *rtnl, sd_netlink_message *message,
assert_not_reached();
}
+ update_dhcp4 = tmp->family == AF_INET6;
+
/* Then, find the managed Address and Request objects corresponding to the received address. */
(void) address_get(link, tmp, &address);
(void) address_get_request(link, tmp, &req);
@@ -1793,7 +1795,7 @@ int manager_rtnl_process_address(sd_netlink *rtnl, sd_netlink_message *message,
if (req)
address_enter_removed(req->userdata);
- return 0;
+ goto finalize;
}
if (!address) {
@@ -1879,6 +1881,15 @@ int manager_rtnl_process_address(sd_netlink *rtnl, sd_netlink_message *message,
if (r < 0)
link_enter_failed(link);
+finalize:
+ if (update_dhcp4) {
+ r = dhcp4_update_ipv6_connectivity(link);
+ if (r < 0) {
+ log_link_warning_errno(link, r, "Failed to notify IPv6 connectivity to DHCPv4 client: %m");
+ link_enter_failed(link);
+ }
+ }
+
return 1;
}