From e06115cb8b372d7e20e600a7c917d30c48c349fd Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 16 Apr 2026 04:07:25 +0900 Subject: [PATCH] sd-dhcp-client: add FIXME comment about the state callback At least currently, it is a theoretical concern, as networkd does not change the client state in the callback. --- src/libsystemd-network/sd-dhcp-client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index ad7714d596..9742ab833b 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -629,6 +629,8 @@ static void client_set_state(sd_dhcp_client *client, DHCPState state) { ; } + // FIXME: If the state callback changes the state, we may not safely free/stop the client, and the + // state machine diagram becomes needlessly complicated. Introduce a guard to avoid that. */ if (client->state_callback) client->state_callback(client, state, client->state_userdata); }