]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-dhcp6-client: call client_notify() in client_enter_bound_state()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 6 Feb 2022 14:58:36 +0000 (23:58 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 14 Feb 2022 05:45:14 +0000 (14:45 +0900)
src/libsystemd-network/sd-dhcp6-client.c

index 1408878da31d7d0fecc4ed7fd67a57f9437e00d6..ff2025efe7e60c5699c7f238de3bcd1ea882383b 100644 (file)
@@ -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);