2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-03 15:35:17 +00:00

[66-authoritative-flag-in-kea] Cleanup code, added legacy unit test

This commit is contained in:
Francis Dupont
2018-11-07 16:01:09 +01:00
committed by Tomek Mrugalski
parent b8d67806bb
commit 2f272cd336
11 changed files with 148 additions and 43 deletions

View File

@@ -2004,9 +2004,9 @@ Dhcpv4Srv::assignLease(Dhcpv4Exchange& ex) {
}
// If we know this client, check if his notion of the IP address is
// correct, if we don't know him check, if we are authoritative.
if ((known_client && (lease->addr_ != hint))
|| (!known_client && authoritative)) {
// correct, if we don't know him, check if we are authoritative.
if ((known_client && (lease->addr_ != hint)) ||
(!known_client && authoritative)) {
LOG_DEBUG(bad_packet4_logger, DBG_DHCP4_DETAIL,
DHCP4_PACKET_NAK_0002)
.arg(query->getLabel())