sd-dhcp-client: make client initially in stopped state
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 23 Aug 2023 04:25:35 +0000 (13:25 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 28 Aug 2023 09:25:14 +0000 (10:25 +0100)
commitb2851e8d6287ab9bb3cd6e42395271c45ce0e377
treece97115683ecad9f3b0bbe42e66af7ae6e43960f
parentc91d636fadc07169641e8a96a2c60083a15e0f77
sd-dhcp-client: make client initially in stopped state

Previously, DHCP_STATE_STOPPED and DHCP_STATE_INIT are both handled as
not-running. Moreover, previously after sd_dhcp_client_start() is
called, the client still in INIT state (and thus handled as not-running)
even if its internal timer event sources are initialized.

Let's make only STOPPED state handled as not-running, and make the
client initially in STOPPED state.

Prompted by #28896.
src/libsystemd-network/dhcp-protocol.h
src/libsystemd-network/sd-dhcp-client.c