X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fnetwork%2Fnetworkd-dhcp4.c;h=1c2edc5b876838631c952d18f877809b8352d5ec;hb=94e15fdc4d9d96fa6607bfb4eaaea164a3aec417;hp=0a8c8ba8e452b862ab6e3144ee406c8971c00f41;hpb=79008bddf679a5e0900369950eb346c9fa687107;p=elogind.git diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index 0a8c8ba8e..1c2edc5b8 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -296,11 +296,8 @@ static int dhcp4_address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, 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); @@ -442,7 +439,7 @@ static int dhcp_lease_acquired(sd_dhcp_client *client, Link *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, @@ -457,7 +454,7 @@ static int dhcp_lease_acquired(sd_dhcp_client *client, Link *link) { 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,