From: Yu Watanabe Date: Wed, 15 Apr 2026 19:07:25 +0000 (+0900) Subject: sd-dhcp-client: add FIXME comment about the state callback X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e06115cb8b372d7e20e600a7c917d30c48c349fd;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index ad7714d596d..9742ab833bd 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); }