summaryrefslogtreecommitdiffstats
path: root/src/libsystemd-network/sd-dhcp-client.c
diff options
context:
space:
mode:
authorRonan Pigott <ronan@rjp.ie>2023-10-26 01:17:44 +0200
committerRonan Pigott <ronan@rjp.ie>2023-10-27 00:26:50 +0200
commit5516b0dd20d8dd4e4093cd4fd0ef56a644a9808d (patch)
tree63f831609cd37b1e4b3089566a28ab18581413ff /src/libsystemd-network/sd-dhcp-client.c
parenteditorconfig: add NEWS whitespace configuration (diff)
downloadsystemd-5516b0dd20d8dd4e4093cd4fd0ef56a644a9808d.tar.xz
systemd-5516b0dd20d8dd4e4093cd4fd0ef56a644a9808d.zip
network: cleanup unreachable condition in dhcp client path
The client state is unconditionally set just above, making this conditional unreachable.
Diffstat (limited to 'src/libsystemd-network/sd-dhcp-client.c')
-rw-r--r--src/libsystemd-network/sd-dhcp-client.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
index f056dcfc93..87d18269e4 100644
--- a/src/libsystemd-network/sd-dhcp-client.c
+++ b/src/libsystemd-network/sd-dhcp-client.c
@@ -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;
}