]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[v4_2] Add define to disable gentle shutodwn by default
authorShawn Routhier <sar@isc.org>
Wed, 2 Jul 2014 15:56:21 +0000 (08:56 -0700)
committerShawn Routhier <sar@isc.org>
Wed, 2 Jul 2014 15:56:21 +0000 (08:56 -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 6d87138fd92704c39bd66048c1853c2176501d60..a37e47094fa55f84ff2bee61c7c81444a34357f7 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -130,11 +130,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.2.6rc1
 
 - None
index 8d803d9ec863226893a099aaf918dc512b74e5b3..25d9747a4926265f291868f733cf14e5498862dd 100644 (file)
@@ -694,9 +694,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 fac1fd0799e3fca9fff2ccfed566ae0cf324fed2..946ddb0e5d0706cc447e6e6486f2bde93857842b 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 */
 
index 78d5bcd313024a03461220b42ec09046ead33e9b..927e40489b2b115a687881c7640a1b751328d051 100644 (file)
@@ -572,9 +572,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 46a668089f72235db1ef9466883f43cf3b184642..884d157362b06ff33daef59c1278695e79ee7782 100644 (file)
@@ -857,9 +857,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
 
        /*
         * Receive packets and dispatch them...