diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-02-06 15:58:36 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-02-14 06:45:14 +0100 |
commit | c41bdb17fc12275b9f0008da82f7d0b4eb62c2c0 (patch) | |
tree | d0f030f889974900bf9dea340c8f32fb2dc4794a | |
parent | sd-dhcp6-client: fix lifetime handling (diff) | |
download | systemd-c41bdb17fc12275b9f0008da82f7d0b4eb62c2c0.tar.xz systemd-c41bdb17fc12275b9f0008da82f7d0b4eb62c2c0.zip |
sd-dhcp6-client: call client_notify() in client_enter_bound_state()
-rw-r--r-- | src/libsystemd-network/sd-dhcp6-client.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c index 1408878da3..ff2025efe7 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); |