diff options
author | Patrik Flykt <patrik.flykt@linux.intel.com> | 2014-01-31 11:31:24 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-01-31 12:04:51 +0100 |
commit | f8fdefe4f50c5b1b34cd018e649deddd7af2519f (patch) | |
tree | 4f35b5155713ba7c78739385fd46f7fa300feb1b /src/libsystemd-dhcp/sd-dhcp-client.c | |
parent | 1aed1cbc10d33e5bf5836e6838ac16add2002152 (diff) |
libsystemd-dhcp: Fix stopping of DHCP client
Go back to Init state independent of the current state the client
is in.
Diffstat (limited to 'src/libsystemd-dhcp/sd-dhcp-client.c')
-rw-r--r-- | src/libsystemd-dhcp/sd-dhcp-client.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/libsystemd-dhcp/sd-dhcp-client.c b/src/libsystemd-dhcp/sd-dhcp-client.c index 37fad9a301..4038785079 100644 --- a/src/libsystemd-dhcp/sd-dhcp-client.c +++ b/src/libsystemd-dhcp/sd-dhcp-client.c @@ -302,24 +302,8 @@ static int client_stop(sd_dhcp_client *client, int error) { client_notify(client, error); - switch (client->state) { - - case DHCP_STATE_INIT: - case DHCP_STATE_SELECTING: - case DHCP_STATE_REQUESTING: - case DHCP_STATE_BOUND: - - client->start_time = 0; - client->state = DHCP_STATE_INIT; - break; - - case DHCP_STATE_INIT_REBOOT: - case DHCP_STATE_REBOOTING: - case DHCP_STATE_RENEWING: - case DHCP_STATE_REBINDING: - - break; - } + client->start_time = 0; + client->state = DHCP_STATE_INIT; if (client->lease) { lease_free(client->lease); |