From: Yu Watanabe Date: Wed, 15 Jul 2020 10:25:55 +0000 (+0900) Subject: dhcp4: only renewing lease when the client already has a lease X-Git-Tag: v246-rc2~61 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0ded0e40ab0b974472474c8f7102837d69017e9b;p=thirdparty%2Fsystemd.git dhcp4: only renewing lease when the client already has a lease Follow-up for ceaec54a3c8366e81863a7d0d9c1f1d9f09960e1. Hopefully fixes #16299. --- diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 8f10b2d9bfc..a83ffc34237 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;