]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: cleanup unreachable condition in dhcp client path
authorRonan Pigott <ronan@rjp.ie>
Wed, 25 Oct 2023 23:17:44 +0000 (16:17 -0700)
committerRonan Pigott <ronan@rjp.ie>
Thu, 26 Oct 2023 22:26:50 +0000 (15:26 -0700)
The client state is unconditionally set just above, making this
conditional unreachable.

src/libsystemd-network/sd-dhcp-client.c

index f056dcfc9369828d6825fc9a31d2bd3eae5b21d4..87d18269e414f39108b2900d8e23a091989d6d60 100644 (file)
@@ -1902,13 +1902,7 @@ static int client_enter_bound_now(sd_dhcp_client *client, int notify_event) {
         close_and_replace(client->fd, r);
         client_initialize_io_events(client, client_receive_message_udp);
 
-        if (IN_SET(client->state, DHCP_STATE_RENEWING, DHCP_STATE_REBINDING) &&
-            notify_event == SD_DHCP_CLIENT_EVENT_IP_ACQUIRE)
-                /* FIXME: hmm, maybe this is a bug... */
-                log_dhcp_client(client, "client_handle_ack() returned SD_DHCP_CLIENT_EVENT_IP_ACQUIRE while DHCP client is %s the address, skipping callback.",
-                                client->state == DHCP_STATE_RENEWING ? "renewing" : "rebinding");
-        else
-                client_notify(client, notify_event);
+        client_notify(client, notify_event);
 
         return 0;
 }