Commit 700e3fca authored by Thomas Markwalder's avatar Thomas Markwalder
Browse files

[master] Moved delayed-ack fully to runtime

    Merges in 42446fd.
parent bafa7b74
...@@ -276,8 +276,9 @@ dhcp-users@lists.isc.org. ...@@ -276,8 +276,9 @@ dhcp-users@lists.isc.org.
default value for delayed-ack, however, has been changed from 28 to 0 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 (i.e. disabled). This was done to minimize the impact on users not
currently using the feature. Please note that the delayed-ack feature currently using the feature. Please note that the delayed-ack feature
is not currently compatible with support for DHPCv4o6 (compiled out by is not currently compatible with support for DHPCv4-over-DHCPv6 so
default). You must compile with one or the other but not both. when a 4to6 port command line argument enables this in the server the
delayed-ack value is reset to 0.
[ISC-Bugs #42446] [ISC-Bugs #42446]
- Corrected some minor coverity issues: CID 1426059, 1426058, and 1426057. - Corrected some minor coverity issues: CID 1426059, 1426058, and 1426057.
......
...@@ -5479,10 +5479,6 @@ if test "$enable_dhcpv4o6" = "yes"; then ...@@ -5479,10 +5479,6 @@ if test "$enable_dhcpv4o6" = "yes"; then
if test "$enable_dhcpv6" = "no"; then if test "$enable_dhcpv6" = "no"; then
as_fn_error $? "dhcpv4o6 requires dhcpv6" "$LINENO" 5 as_fn_error $? "dhcpv4o6 requires dhcpv6" "$LINENO" 5
fi 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 $as_echo "#define DHCP4o6 1" >>confdefs.h
......
...@@ -170,10 +170,6 @@ if test "$enable_dhcpv4o6" = "yes"; then ...@@ -170,10 +170,6 @@ if test "$enable_dhcpv4o6" = "yes"; then
if test "$enable_dhcpv6" = "no"; then if test "$enable_dhcpv6" = "no"; then
AC_MSG_ERROR([dhcpv4o6 requires dhcpv6]) AC_MSG_ERROR([dhcpv4o6 requires dhcpv6])
fi 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], AC_DEFINE([DHCP4o6], [1],
[Define to 1 to include DHCPv4 over DHCPv6 support.]) [Define to 1 to include DHCPv4 over DHCPv6 support.])
else else
......
AC_INIT([DHCP],[4.4.0-dev],[dhcp-users@isc.org]) AC_INIT([DHCP],[4.4.0a1],[dhcp-users@isc.org])
# for libtool # for libtool
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
...@@ -171,10 +171,6 @@ if test "$enable_dhcpv4o6" = "yes"; then ...@@ -171,10 +171,6 @@ if test "$enable_dhcpv4o6" = "yes"; then
if test "$enable_dhcpv6" = "no"; then if test "$enable_dhcpv6" = "no"; then
AC_MSG_ERROR([dhcpv4o6 requires dhcpv6]) AC_MSG_ERROR([dhcpv4o6 requires dhcpv6])
fi 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], AC_DEFINE([DHCP4o6], [1],
[Define to 1 to include DHCPv4 over DHCPv6 support.]) [Define to 1 to include DHCPv4 over DHCPv6 support.])
else else
......
AC_INIT([DHCP],[4.4.0-dev],[dhcp-users@isc.org]) AC_INIT([DHCP],[4.4.0a1],[dhcp-users@isc.org])
@BEGIN WITH LIBTOOL @BEGIN WITH LIBTOOL
# for libtool # for libtool
...@@ -176,10 +176,6 @@ if test "$enable_dhcpv4o6" = "yes"; then ...@@ -176,10 +176,6 @@ if test "$enable_dhcpv4o6" = "yes"; then
if test "$enable_dhcpv6" = "no"; then if test "$enable_dhcpv6" = "no"; then
AC_MSG_ERROR([dhcpv4o6 requires dhcpv6]) AC_MSG_ERROR([dhcpv4o6 requires dhcpv6])
fi 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], AC_DEFINE([DHCP4o6], [1],
[Define to 1 to include DHCPv4 over DHCPv6 support.]) [Define to 1 to include DHCPv4 over DHCPv6 support.])
else else
......
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, # we specify "foreign" to avoid having to have the GNU mandated files,
...@@ -170,10 +170,6 @@ if test "$enable_dhcpv4o6" = "yes"; then ...@@ -170,10 +170,6 @@ if test "$enable_dhcpv4o6" = "yes"; then
if test "$enable_dhcpv6" = "no"; then if test "$enable_dhcpv6" = "no"; then
AC_MSG_ERROR([dhcpv4o6 requires dhcpv6]) AC_MSG_ERROR([dhcpv4o6 requires dhcpv6])
fi 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], AC_DEFINE([DHCP4o6], [1],
[Define to 1 to include DHCPv4 over DHCPv6 support.]) [Define to 1 to include DHCPv4 over DHCPv6 support.])
else else
......
...@@ -2149,7 +2149,7 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp) ...@@ -2149,7 +2149,7 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp)
struct in_addr from; struct in_addr from;
TIME remaining_time; TIME remaining_time;
struct iaddr cip; struct iaddr cip;
#if defined(DELAYED_ACK) && !defined(DHCP4o6) #if defined(DELAYED_ACK)
/* By default we don't do the enqueue */ /* By default we don't do the enqueue */
isc_boolean_t enqueue = ISC_FALSE; isc_boolean_t enqueue = ISC_FALSE;
#endif #endif
...@@ -3163,7 +3163,7 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp) ...@@ -3163,7 +3163,7 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp)
commit = 0; commit = 0;
} }
#if !defined(DELAYED_ACK) || defined(DHCP4o6) #if !defined(DELAYED_ACK)
/* Install the new information on 'lt' onto the lease at /* Install the new information on 'lt' onto the lease at
* 'lease'. If this is a DHCPOFFER, it is a 'soft' promise, * 'lease'. If this is a DHCPOFFER, it is a 'soft' promise,
* if it is a DHCPACK, it is a 'hard' binding, so it needs * 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) ...@@ -3175,7 +3175,7 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp)
if ((use_old_lease == 0) && if ((use_old_lease == 0) &&
!supersede_lease(lease, lt, commit, !supersede_lease(lease, lt, commit,
offer == DHCPACK, offer == DHCPACK, 0)) { 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 * If there already isn't a need for a lease commit, and we
* can just answer right away, set a flag to indicate this. * 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) ...@@ -3573,7 +3573,7 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp)
++outstanding_pings; ++outstanding_pings;
} else { } else {
lease->cltt = cur_time; lease->cltt = cur_time;
#if defined(DELAYED_ACK) && !defined(DHCP4o6) #if defined(DELAYED_ACK)
if (enqueue && max_outstanding_acks != 0) if (enqueue && max_outstanding_acks != 0)
delayed_ack_enqueue(lease); delayed_ack_enqueue(lease);
else else
......
...@@ -1335,6 +1335,17 @@ void postconf_initialization (int quiet) ...@@ -1335,6 +1335,17 @@ void postconf_initialization (int quiet)
} }
data_string_forget(&db, MDL); 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); oc = lookup_option(&server_universe, options, SV_MAX_ACK_DELAY);
if (oc && if (oc &&
......
...@@ -2287,8 +2287,8 @@ a second). ...@@ -2287,8 +2287,8 @@ a second).
The delayed-ack feature is compiled in by default, but can be disabled The delayed-ack feature is compiled in by default, but can be disabled
at compile time with \'./configure --disable-delayed-ack\'. Please note at compile time with \'./configure --disable-delayed-ack\'. Please note
that the delayed-ack feature is not currently compatible with support for that the delayed-ack feature is not currently compatible with support for
DHPCv4o6 (compiled out by default). You must compile with one or the DHPCv4-over-DHCPv6 so when a 4to6 port ommand line argument enables this
other but not both. in the server the delayed-ack value is reset to 0.
.RE .RE
.PP .PP
The The
......
...@@ -234,7 +234,7 @@ static struct option server_options[] = { ...@@ -234,7 +234,7 @@ static struct option server_options[] = {
{ "limit-addrs-per-ia", "L", &server_universe, 56, 1 }, { "limit-addrs-per-ia", "L", &server_universe, 56, 1 },
{ "limit-prefs-per-ia", "L", &server_universe, 57, 1 }, { "limit-prefs-per-ia", "L", &server_universe, 57, 1 },
/* Assert a configuration parsing error if delayed-ack isn't compiled in. */ /* 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 }, { "delayed-ack", "S", &server_universe, 58, 1 },
{ "max-ack-delay", "L", &server_universe, 59, 1 }, { "max-ack-delay", "L", &server_universe, 59, 1 },
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment