From: Roy Marples Date: Fri, 15 May 2020 14:34:16 +0000 (+0100) Subject: DHCP: always log inform when not renewing X-Git-Tag: v9.1.0~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3851b6b2355fbb985fab8b9757b99126b4df97ef;p=thirdparty%2Fdhcpcd.git DHCP: always log inform when not renewing So that we log a new lease on rebind from a renew failure. --- diff --git a/src/dhcp.c b/src/dhcp.c index 08f85c9a..dba0f1ed 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -2230,7 +2230,7 @@ dhcp_bind(struct interface *ifp) "rebind time, forcing to %"PRIu32" seconds", ifp->name, lease->renewaltime); } - if (state->addr && + if (state->state == DHS_RENEW && state->addr && lease->addr.s_addr == state->addr->addr.s_addr && !(state->added & STATE_FAKE)) logdebugx("%s: leased %s for %"PRIu32" seconds", diff --git a/src/dhcp6.c b/src/dhcp6.c index 6bc3e627..57f1a57b 100644 --- a/src/dhcp6.c +++ b/src/dhcp6.c @@ -3051,7 +3051,7 @@ dhcp6_bind(struct interface *ifp, const char *op, const char *sfrom) break; } } - loglevel = has_new ? LOG_INFO : LOG_DEBUG; + loglevel = has_new || state->state != DH6S_RENEW ? LOG_INFO : LOG_DEBUG; if (!timedout) { logmessage(loglevel, "%s: %s received from %s", ifp->name, op, sfrom);