2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-04 07:55:18 +00:00

[694-add-valid-lifetime-to-dhcp4_lease_alloc-and-dhcp6_lease_alloc-logging] Added lease valid lifetime to DHCP*_LEASE_ALLOC logs

This commit is contained in:
Francis Dupont
2019-06-25 11:06:16 +02:00
parent e34d0e7048
commit 20cd73860b
9 changed files with 56 additions and 32 deletions

View File

@@ -2120,9 +2120,16 @@ Dhcpv4Srv::assignLease(Dhcpv4Exchange& ex) {
if (lease) {
// We have a lease! Let's set it in the packet and send it back to
// the client.
LOG_INFO(lease4_logger, fake_allocation ? DHCP4_LEASE_ADVERT : DHCP4_LEASE_ALLOC)
.arg(query->getLabel())
.arg(lease->addr_.toText());
if (fake_allocation) {
LOG_INFO(lease4_logger, DHCP4_LEASE_ADVERT)
.arg(query->getLabel())
.arg(lease->addr_.toText());
} else {
LOG_INFO(lease4_logger, DHCP4_LEASE_ALLOC)
.arg(query->getLabel())
.arg(lease->addr_.toText())
.arg(lease->valid_lft_);
}
// We're logging this here, because this is the place where we know
// which subnet has been actually used for allocation. If the