From 6826003be8ed4715bd6ac40decc364a65eb5b036 Mon Sep 17 00:00:00 2001 From: Thomas Markwalder Date: Fri, 9 Feb 2018 09:19:54 -0500 Subject: [PATCH] [master] Correct delayed-ack 0 prohibiting active lease updates to lease file Merges in 47141. --- RELNOTES | 10 ++++++++++ includes/dhcpd.h | 2 +- server/dhcp.c | 4 ++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/RELNOTES b/RELNOTES index 0a1f9b452..ca27e6b5a 100644 --- a/RELNOTES +++ b/RELNOTES @@ -87,6 +87,16 @@ ISC DHCP is open source software maintained by Internet Systems Consortium. This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). + Changes since 4.4.0 (New Features) +- none + Changes since 4.4.0 (Bugs) + +- A delayed-ack value of 0 (the default), now correctly disables the delayed + feature. A change in 4.4.0 prohibited lease updates marking leases active + from be written to the lease file when delayed-ack is 0. This in turn, + caused servers to lose active lease assignments upon restart. + [ISC-Bugs #47141] + Changes since 4.4.0b1 (New Features) - Duplicate address detection when binding to a new IPv6 address was added diff --git a/includes/dhcpd.h b/includes/dhcpd.h index eecc5d72a..5930e6ad8 100644 --- a/includes/dhcpd.h +++ b/includes/dhcpd.h @@ -821,7 +821,7 @@ struct lease_state { #endif #if !defined (DEFAULT_DELAYED_ACK) -# define DEFAULT_DELAYED_ACK 0 /* default SO_SNDBUF size / 576 bytes */ +# define DEFAULT_DELAYED_ACK 0 /* default 0 disables delayed acking */ #endif #if !defined (DEFAULT_ACK_DELAY_SECS) diff --git a/server/dhcp.c b/server/dhcp.c index f302d6e66..6f3a91f09 100644 --- a/server/dhcp.c +++ b/server/dhcp.c @@ -3,7 +3,7 @@ DHCP Protocol engine. */ /* - * Copyright (c) 2004-2017 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2004-2018 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1995-2003 by Internet Software Consortium * * This Source Code Form is subject to the terms of the Mozilla Public @@ -3610,7 +3610,7 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp) } else { lease->cltt = cur_time; #if defined(DELAYED_ACK) - if (enqueue && max_outstanding_acks != 0) + if (enqueue) delayed_ack_enqueue(lease); else #endif -- 2.39.5