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

[master] Add define to disable gentle shutodwn by default

Add a define to disable the gentle shutdown feature by default.
The feature has some effects (recover-wait in failvoer pairs)
and release in clients that are always desired.  We plan to
revisit this in order to make it easier to use but with the
define it can be enabled if necessary.
This commit is contained in:
Shawn Routhier
2014-07-02 08:49:19 -07:00
parent ad80055f72
commit e9326fd0f4
5 changed files with 23 additions and 1 deletions

View File

@@ -172,11 +172,15 @@ by Eric Young (eay@cryptsoft.com).
- Add code to properly dereference a pointer in the dhclient code - Add code to properly dereference a pointer in the dhclient code
on an error condition. on an error condition.
[ISC-Bugs #36194 [ISC-Bugs #36194]
- Add code to help clean up soft leases. - Add code to help clean up soft leases.
[ISC-Bugs #36304] [ISC-Bugs #36304]
- Disable the gentle shutdown functionality until we can determine
the best way to present it to remove or reduce the side effects.
[ISC-Bugs #36066]
Changes since 4.3.0rc1 Changes since 4.3.0rc1
- None - None

View File

@@ -714,9 +714,12 @@ main(int argc, char **argv) {
dmalloc_outstanding = 0; dmalloc_outstanding = 0;
#endif #endif
#if defined(ENABLE_GENTLE_SHUTDOWN)
/* no signal handlers until we deal with the side effects */
/* install signal handlers */ /* install signal handlers */
signal(SIGINT, dhcp_signal_handler); /* control-c */ signal(SIGINT, dhcp_signal_handler); /* control-c */
signal(SIGTERM, dhcp_signal_handler); /* kill */ signal(SIGTERM, dhcp_signal_handler); /* kill */
#endif
/* If we're not supposed to wait before getting the address, /* If we're not supposed to wait before getting the address,
don't. */ don't. */

View File

@@ -295,6 +295,15 @@
prefix. */ prefix. */
#define DHCLIENT_DEFAULT_PREFIX_LEN 64 #define DHCLIENT_DEFAULT_PREFIX_LEN 64
/* Enable the gentle shutdown signal handling. Currently this
means that on SIGINT or SIGTERM a client will release its
address and a server in a failover pair will go through
partner down. Both of which can be undesireable in some
situations. We plan to revisit this feature and may
make non-backwards compatible changes including the
removal of this define. Use at your own risk. */
/* #define ENABLE_GENTLE_SHUTDOWN */
/* Include definitions for various options. In general these /* Include definitions for various options. In general these
should be left as is, but if you have already defined one should be left as is, but if you have already defined one
of these and prefer your definition you can comment the of these and prefer your definition you can comment the

View File

@@ -591,9 +591,12 @@ main(int argc, char **argv) {
dhcpv6_packet_handler = do_packet6; dhcpv6_packet_handler = do_packet6;
#endif #endif
#if defined(ENABLE_GENTLE_SHUTDOWN)
/* no signal handlers until we deal with the side effects */
/* install signal handlers */ /* install signal handlers */
signal(SIGINT, dhcp_signal_handler); /* control-c */ signal(SIGINT, dhcp_signal_handler); /* control-c */
signal(SIGTERM, dhcp_signal_handler); /* kill */ signal(SIGTERM, dhcp_signal_handler); /* kill */
#endif
/* Start dispatching packets and timeouts... */ /* Start dispatching packets and timeouts... */
dispatch(); dispatch();

View File

@@ -787,9 +787,12 @@ main(int argc, char **argv) {
omapi_set_int_value ((omapi_object_t *)dhcp_control_object, omapi_set_int_value ((omapi_object_t *)dhcp_control_object,
(omapi_object_t *)0, "state", server_running); (omapi_object_t *)0, "state", server_running);
#if defined(ENABLE_GENTLE_SHUTDOWN)
/* no signal handlers until we deal with the side effects */
/* install signal handlers */ /* install signal handlers */
signal(SIGINT, dhcp_signal_handler); /* control-c */ signal(SIGINT, dhcp_signal_handler); /* control-c */
signal(SIGTERM, dhcp_signal_handler); /* kill */ signal(SIGTERM, dhcp_signal_handler); /* kill */
#endif
/* Log that we are about to start working */ /* Log that we are about to start working */
log_info("Server starting service."); log_info("Server starting service.");