Mercurial > hg > dhcpcd
changeset 5226:06575a46bbdd draft
DHCP: always log inform when not renewing
So that we log a new lease on rebind from a renew failure.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Fri, 15 May 2020 15:34:16 +0100 |
| parents | 2b18af138e24 |
| children | 7406014c9120 |
| files | src/dhcp.c src/dhcp6.c |
| diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dhcp.c Thu May 14 01:15:39 2020 +0100 +++ b/src/dhcp.c Fri May 15 15:34:16 2020 +0100 @@ -2230,7 +2230,7 @@ "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",
--- a/src/dhcp6.c Thu May 14 01:15:39 2020 +0100 +++ b/src/dhcp6.c Fri May 15 15:34:16 2020 +0100 @@ -3051,7 +3051,7 @@ 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);
