log_link_error(link, "could not set DHCPv4 address: %s",
strerror(-r));
link_enter_failed(link);
- } else if (r >= 0) {
- /* calling handler directly so take a ref */
- link_ref(link);
- link_get_address_handler(rtnl, m, link);
- }
+ } else if (r >= 0)
+ link_rtnl_process_address(rtnl, m, link->manager);
link_set_dhcp_routes(link);
}
if (r >= 0)
- log_link_struct(LOG_INFO, link,
+ log_link_struct(link, LOG_INFO,
"MESSAGE=%-*s: DHCPv4 address %u.%u.%u.%u/%u via %u.%u.%u.%u",
IFNAMSIZ,
link->ifname,
ADDRESS_FMT_VAL(gateway),
NULL);
else
- log_link_struct(LOG_INFO, link,
+ log_link_struct(link, LOG_INFO,
"MESSAGE=%-*s: DHCPv4 address %u.%u.%u.%u/%u",
IFNAMSIZ,
link->ifname,
assert(link);
assert(link->network);
- assert(IN_SET(link->network->dhcp, DHCP_SUPPORT_BOTH, DHCP_SUPPORT_V4));
+ assert(IN_SET(link->network->dhcp, ADDRESS_FAMILY_YES, ADDRESS_FAMILY_IPV4));
r = sd_dhcp_client_new(&link->dhcp_client);
if (r < 0)