diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-07-15 19:25:55 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-07-16 14:58:54 +0900 |
commit | 0ded0e40ab0b974472474c8f7102837d69017e9b (patch) | |
tree | a39e07cdad82c8c6a9d511592b608ceaef1edb6d | |
parent | 330f89907911f533f35639f58880eda4462d06a8 (diff) | |
download | systemd-0ded0e40ab0b974472474c8f7102837d69017e9b.tar.gz |
dhcp4: only renewing lease when the client already has a lease
Follow-up for ceaec54a3c8366e81863a7d0d9c1f1d9f09960e1.
Hopefully fixes #16299.
-rw-r--r-- | src/libsystemd-network/sd-dhcp-client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 8f10b2d9bf..a83ffc3423 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -2015,7 +2015,7 @@ int sd_dhcp_client_send_renew(sd_dhcp_client *client) { assert_return(client, -EINVAL); assert_return(client->fd >= 0, -EINVAL); - if (IN_SET(client->state, DHCP_STATE_INIT, DHCP_STATE_INIT_REBOOT, DHCP_STATE_STOPPED)) + if (!client->lease) return 0; client->start_delay = 0; |