please enhance DHCP logging for "peer holds all free leases"
name: Feature request
about: Suggest an idea for this project
Some initial questions
- Are you sure your feature is not already implemented in the latest ISC DHCP version? Not in 4.4.2b1
- Are you sure your feature is not already implemented in the latest Kea version? Can't easily tell (message not similar enough to quickly find)
- Are you sure what you would like to do is not possible using some other mechanisms? Yes
- Have you discussed your idea on dhcp-users or dhcp-workers mailing lists? No since it is such a trivial change
Describe the solution you'd like In server/dhcp.c I'd like to see this change: --- dhcp.c.orig 2019-12-17 13:13:31.000000000 -0600 +++ - 2020-01-09 08:50:16.350350969 -0600 @@ -391,18 +391,19 @@ #endif
/* If we didn't find a lease, try to allocate one... */
if (!lease) {
if (!allocate_lease (&lease, packet,
packet -> shared_network -> pools,
&peer_has_leases)) {
if (peer_has_leases)
-
log_error ("%s: peer holds all free leases",
-
msgbuf);
-
log_error ("%s: network %s: peer holds all free leases",
-
msgbuf,
-
packet -> shared_network -> name); else log_error ("%s: network %s: no free leases", msgbuf, packet -> shared_network -> name); return; } }