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.
- Add code to properly dereference a pointer in the dhclient code
on an error condition.
- [ISC-Bugs #36194
+ [ISC-Bugs #36194]
- Add code to help clean up soft leases.
[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
- None
dmalloc_outstanding = 0;
#endif
+#if defined(ENABLE_GENTLE_SHUTDOWN)
+ /* no signal handlers until we deal with the side effects */
/* install signal handlers */
signal(SIGINT, dhcp_signal_handler); /* control-c */
signal(SIGTERM, dhcp_signal_handler); /* kill */
+#endif
/* If we're not supposed to wait before getting the address,
don't. */
prefix. */
#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
should be left as is, but if you have already defined one
of these and prefer your definition you can comment the
dhcpv6_packet_handler = do_packet6;
#endif
+#if defined(ENABLE_GENTLE_SHUTDOWN)
+ /* no signal handlers until we deal with the side effects */
/* install signal handlers */
signal(SIGINT, dhcp_signal_handler); /* control-c */
signal(SIGTERM, dhcp_signal_handler); /* kill */
+#endif
/* Start dispatching packets and timeouts... */
dispatch();
omapi_set_int_value ((omapi_object_t *)dhcp_control_object,
(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 */
signal(SIGINT, dhcp_signal_handler); /* control-c */
signal(SIGTERM, dhcp_signal_handler); /* kill */
+#endif
/* Log that we are about to start working */
log_info("Server starting service.");