]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[master] Moved delayed-ack fully to runtime
authorThomas Markwalder <tmark@isc.org>
Tue, 19 Dec 2017 11:25:12 +0000 (06:25 -0500)
committerThomas Markwalder <tmark@isc.org>
Tue, 19 Dec 2017 11:25:12 +0000 (06:25 -0500)
    Merges in 42446fd.

RELNOTES
configure
configure.ac
configure.ac+lt
configure.ac-base
configure.ac-lt
server/dhcp.c
server/dhcpd.c
server/dhcpd.conf.5
server/stables.c

index 22ac72b0f06e22d543ff4922dc1aad826c705631..f0b04ca3f8a81c9abc1096f91efcd48bcde2a9f0 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -276,8 +276,9 @@ dhcp-users@lists.isc.org.
   default value for delayed-ack, however, has been changed from 28 to 0
   (i.e. disabled).  This was done to minimize the impact on users not
   currently using the feature.  Please note that the delayed-ack feature
-  is not currently compatible with support for DHPCv4o6 (compiled out by
-  default).  You must compile with one or the other but not both.
+  is not currently compatible with support for DHPCv4-over-DHCPv6 so
+  when a 4to6 port command line argument enables this in the server the
+  delayed-ack value is reset to 0.
   [ISC-Bugs #42446]
 
 - Corrected some minor coverity issues: CID 1426059, 1426058, and 1426057.
index 618fb9ef1b5c635eec4c8e0aef73f275cb847efa..5d12223e9cf9a25f7d21b066ea8ee17678ced5cb 100755 (executable)
--- a/configure
+++ b/configure
@@ -5479,10 +5479,6 @@ if test "$enable_dhcpv4o6" = "yes"; then
        if test "$enable_dhcpv6" = "no"; then
                as_fn_error $? "dhcpv4o6 requires dhcpv6" "$LINENO" 5
        fi
-       # DHCPv4o6 is not yet compatible with delayed-ack
-       if test "$enable_delayed_ack" = "yes"; then
-               as_fn_error $? "dhcpv4o6 is not compatible with delayed-ack" "$LINENO" 5
-       fi
 
 $as_echo "#define DHCP4o6 1" >>confdefs.h
 
index 58af400e94c305dd10c257fbb7a298a5cf5a14f4..52e7bb4ea97be130d2274da0f6f442589d04bd9b 100644 (file)
@@ -170,10 +170,6 @@ if test "$enable_dhcpv4o6" = "yes"; then
        if test "$enable_dhcpv6" = "no"; then
                AC_MSG_ERROR([dhcpv4o6 requires dhcpv6])
        fi
-       # DHCPv4o6 is not yet compatible with delayed-ack
-       if test "$enable_delayed_ack" = "yes"; then
-               AC_MSG_ERROR([dhcpv4o6 is not compatible with delayed-ack])
-       fi
        AC_DEFINE([DHCP4o6], [1], 
                  [Define to 1 to include DHCPv4 over DHCPv6 support.])
 else
index 448b893a3652b30c7c072791b4bec10f6c8e8800..6fa7edba0d9334ba3c92764a4f43d3ae44953f0f 100644 (file)
@@ -1,4 +1,4 @@
-AC_INIT([DHCP],[4.4.0-dev],[dhcp-users@isc.org])
+AC_INIT([DHCP],[4.4.0a1],[dhcp-users@isc.org])
 
 # for libtool
 AC_CONFIG_MACRO_DIR([m4])
@@ -171,10 +171,6 @@ if test "$enable_dhcpv4o6" = "yes"; then
        if test "$enable_dhcpv6" = "no"; then
                AC_MSG_ERROR([dhcpv4o6 requires dhcpv6])
        fi
-       # DHCPv4o6 is not yet compatible with delayed-ack
-       if test "$enable_delayed_ack" = "yes"; then
-               AC_MSG_ERROR([dhcpv4o6 is not compatible with delayed-ack])
-       fi
        AC_DEFINE([DHCP4o6], [1], 
                  [Define to 1 to include DHCPv4 over DHCPv6 support.])
 else
index 03642813493e390c338867c6cdd1f749d7612d62..8cf37969f74e1ec1a2221caddf2fd2dcc2b131fc 100644 (file)
@@ -1,4 +1,4 @@
-AC_INIT([DHCP],[4.4.0-dev],[dhcp-users@isc.org])
+AC_INIT([DHCP],[4.4.0a1],[dhcp-users@isc.org])
 
 @BEGIN WITH LIBTOOL
 # for libtool
@@ -176,10 +176,6 @@ if test "$enable_dhcpv4o6" = "yes"; then
        if test "$enable_dhcpv6" = "no"; then
                AC_MSG_ERROR([dhcpv4o6 requires dhcpv6])
        fi
-       # DHCPv4o6 is not yet compatible with delayed-ack
-       if test "$enable_delayed_ack" = "yes"; then
-               AC_MSG_ERROR([dhcpv4o6 is not compatible with delayed-ack])
-       fi
        AC_DEFINE([DHCP4o6], [1], 
                  [Define to 1 to include DHCPv4 over DHCPv6 support.])
 else
index 16c255e2bb233a4a0460260d5ca7794b851ed98d..52e7bb4ea97be130d2274da0f6f442589d04bd9b 100644 (file)
@@ -1,4 +1,4 @@
-AC_INIT([DHCP],[4.4.0-dev],[dhcp-users@isc.org])
+AC_INIT([DHCP],[4.4.0a1],[dhcp-users@isc.org])
 
 
 # we specify "foreign" to avoid having to have the GNU mandated files,
@@ -170,10 +170,6 @@ if test "$enable_dhcpv4o6" = "yes"; then
        if test "$enable_dhcpv6" = "no"; then
                AC_MSG_ERROR([dhcpv4o6 requires dhcpv6])
        fi
-       # DHCPv4o6 is not yet compatible with delayed-ack
-       if test "$enable_delayed_ack" = "yes"; then
-               AC_MSG_ERROR([dhcpv4o6 is not compatible with delayed-ack])
-       fi
        AC_DEFINE([DHCP4o6], [1], 
                  [Define to 1 to include DHCPv4 over DHCPv6 support.])
 else
index 3396ebad3fadb6424f850b167a7b2a085587e0f0..f16d001d4965304f94836108ab6c716f69edd39c 100644 (file)
@@ -2149,7 +2149,7 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp)
        struct in_addr from;
        TIME remaining_time;
        struct iaddr cip;
-#if defined(DELAYED_ACK) && !defined(DHCP4o6)
+#if defined(DELAYED_ACK)
        /* By default we don't do the enqueue */
        isc_boolean_t enqueue = ISC_FALSE;
 #endif
@@ -3163,7 +3163,7 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp)
                        commit = 0;
                }
 
-#if !defined(DELAYED_ACK) || defined(DHCP4o6)
+#if !defined(DELAYED_ACK)
                /* Install the new information on 'lt' onto the lease at
                 * 'lease'.  If this is a DHCPOFFER, it is a 'soft' promise,
                 * if it is a DHCPACK, it is a 'hard' binding, so it needs
@@ -3175,7 +3175,7 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp)
                if ((use_old_lease == 0) &&
                    !supersede_lease(lease, lt, commit,
                                     offer == DHCPACK, offer == DHCPACK, 0)) {
-#else /* defined(DELAYED_ACK) && !defined(DHCP4o6) */
+#else /* defined(DELAYED_ACK) */
                /*
                 * If there already isn't a need for a lease commit, and we
                 * can just answer right away, set a flag to indicate this.
@@ -3573,7 +3573,7 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp)
                ++outstanding_pings;
        } else {
                lease->cltt = cur_time;
-#if defined(DELAYED_ACK) && !defined(DHCP4o6)
+#if defined(DELAYED_ACK)
                if (enqueue && max_outstanding_acks != 0)
                        delayed_ack_enqueue(lease);
                else 
index c5b9d092e35d64ffaed00099f9d373b158484883..68e74b5414c9479c9bc72eb479901d67149a9785 100644 (file)
@@ -1335,6 +1335,17 @@ void postconf_initialization (int quiet)
                }
                data_string_forget(&db, MDL);
        }
+#if defined(DHCP4o6)
+       /* Delayed acks and DHCPv4-over-DHCPv6 are incompatible */
+       if (dhcpv4_over_dhcpv6) {
+               if (max_outstanding_acks > 0) {
+                       log_debug("DHCP4o6 enabled, "
+                                 "setting delayed-ack to zero (incompatible)");
+               }
+
+               max_outstanding_acks = 0;
+       }
+#endif
 
        oc = lookup_option(&server_universe, options, SV_MAX_ACK_DELAY);
        if (oc &&
index 7244fa7c085b18fd490180d1fdb81208e55cbcac..cfedf63eb8678f35e0a4b228218aefd707d89964 100644 (file)
@@ -2287,8 +2287,8 @@ a second).
 The delayed-ack feature is compiled in by default, but can be disabled
 at compile time with \'./configure --disable-delayed-ack\'.  Please note
 that the delayed-ack feature is not currently compatible with support for
-DHPCv4o6 (compiled out by default).  You must compile with one or the
-other but not both.
+DHPCv4-over-DHCPv6 so when a 4to6 port ommand line argument enables this
+in the server the delayed-ack value is reset to 0.
 .RE
 .PP
 The
index e85696e1eee69f0cc7a4c35b52b8c6420ed8b2e1..cea24bc3633897b69677ed4fe1d4076dc01b6180 100644 (file)
@@ -234,7 +234,7 @@ static struct option server_options[] = {
        { "limit-addrs-per-ia", "L",            &server_universe,  56, 1 },
        { "limit-prefs-per-ia", "L",            &server_universe,  57, 1 },
 /* Assert a configuration parsing error if delayed-ack isn't compiled in. */
-#if defined(DELAYED_ACK) && !defined(DHCP4o6)
+#if defined(DELAYED_ACK)
        { "delayed-ack", "S",                   &server_universe,  58, 1 },
        { "max-ack-delay", "L",                 &server_universe,  59, 1 },
 #endif