]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[master] Add define to disable gentle shutodwn by default
authorShawn Routhier <sar@isc.org>
Wed, 2 Jul 2014 15:49:19 +0000 (08:49 -0700)
committerShawn Routhier <sar@isc.org>
Wed, 2 Jul 2014 15:49:19 +0000 (08:49 -0700)
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.

RELNOTES
client/dhclient.c
includes/site.h
relay/dhcrelay.c
server/dhcpd.c

index f9bb65bd5275f07096c9cc5939c21ba133204eab..f8c62a4a5a5830a4eba6a452b4d5b7a945c38390 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -172,11 +172,15 @@ by Eric Young (eay@cryptsoft.com).
 
 - 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
index 12c42b792709a014fc8c6b5bd2ee5594fece78c0..5ef59cd4b687c8ed5ec3709898ca24f597db3804 100644 (file)
@@ -714,9 +714,12 @@ main(int argc, char **argv) {
        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. */
index 6ba5a8a76d0ac9fcc20f71ea3ab9f2287303d8a4..d87b309e9245ea37ec740362b36e8c19345c8f50 100644 (file)
    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 
index 115fbd4576bed3d4595ece87acead49cc5a9c991..80ebc3957d183bda15f3e746816af4b6c303b523 100644 (file)
@@ -591,9 +591,12 @@ main(int argc, char **argv) {
                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();
index 1f2d774f7b6d96c88c5b21f94a2b5f073c48ead3..24d638e7d31e3f29746d5374d7012fbfa94ef7f4 100644 (file)
@@ -787,9 +787,12 @@ main(int argc, char **argv) {
        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.");