From: Yu Watanabe Date: Sun, 6 Feb 2022 14:58:36 +0000 (+0900) Subject: sd-dhcp6-client: call client_notify() in client_enter_bound_state() X-Git-Tag: v251-rc1~291^2~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c41bdb17fc12275b9f0008da82f7d0b4eb62c2c0;p=thirdparty%2Fsystemd.git sd-dhcp6-client: call client_notify() in client_enter_bound_state() --- diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c index 1408878da31..ff2025efe7e 100644 --- a/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/libsystemd-network/sd-dhcp6-client.c @@ -895,6 +895,7 @@ static int client_enter_bound_state(sd_dhcp6_client *client) { } client->state = DHCP6_STATE_BOUND; + client_notify(client, SD_DHCP6_CLIENT_EVENT_IP_ACQUIRE); return 0; error: @@ -1139,12 +1140,7 @@ static int client_process_reply( sd_dhcp6_lease_unref(client->lease); client->lease = TAKE_PTR(lease); - r = client_enter_bound_state(client); - if (r < 0) - return r; - - client_notify(client, SD_DHCP6_CLIENT_EVENT_IP_ACQUIRE); - return 0; + return client_enter_bound_state(client); } static int client_process_advertise_or_rapid_commit_reply( @@ -1183,12 +1179,7 @@ static int client_process_advertise_or_rapid_commit_reply( sd_dhcp6_lease_unref(client->lease); client->lease = TAKE_PTR(lease); - r = client_enter_bound_state(client); - if (r < 0) - return r; - - client_notify(client, SD_DHCP6_CLIENT_EVENT_IP_ACQUIRE); - return 0; + return client_enter_bound_state(client); } r = dhcp6_lease_get_preference(lease, &pref_advertise);