diff options
author | Tom Gundersen <teg@jklm.no> | 2014-03-20 16:21:43 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-03-20 17:07:43 +0100 |
commit | 58ec2d3e6e7d2274f5bb5cb64b936f1dbac45168 (patch) | |
tree | 8f0d169542532f9e6a9fd358d3769f004da177bd /src/libsystemd-network | |
parent | 6236f49b230568ba3163df71fd7d386d354091de (diff) |
sd-dhcp-client: do not reset 'secs' when entering INIT-REBOOT
Also keep start_time in sync, but that shouldn't matter.
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r-- | src/libsystemd-network/sd-dhcp-client.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 5d8efbbd3f..6e35ef403b 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -198,8 +198,6 @@ static int client_initialize(sd_dhcp_client *client) { client->attempt = 1; - client->start_time = 0; - client->secs = 0; client->state = DHCP_STATE_INIT; client->xid = 0; @@ -592,10 +590,12 @@ static int client_start(sd_dhcp_client *client) { client_stop(client, r); return r; } - client->fd = r; - client->start_time = now(CLOCK_MONOTONIC); - client->secs = 0; + + if (client->state == DHCP_STATE_INIT) { + client->start_time = now(CLOCK_MONOTONIC); + client->secs = 0; + } log_dhcp_client(client, "STARTED"); |