summaryrefslogtreecommitdiff
path: root/relay/dhcrelay.c
diff options
context:
space:
mode:
authorShawn Routhier <sar@isc.org>2013-11-14 12:55:10 -0800
committerShawn Routhier <sar@isc.org>2013-11-14 12:55:10 -0800
commit0895c955d16a957107771e442397c6260d92cbc2 (patch)
treebeb3d593cb202f75f92bad953fb1eaef1a875671 /relay/dhcrelay.c
parentf88446f16b9b3be36492f78b0f66a4166e459896 (diff)
downloadisc-dhcp-0895c955d16a957107771e442397c6260d92cbc2.tar.gz
[master] Fix up the gentle shutdown code to handle failover
This patch modifies the gentle failover patch to be cleaner and to handle failover peers better.
Diffstat (limited to 'relay/dhcrelay.c')
-rw-r--r--relay/dhcrelay.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c
index a218dece..b2d7bd90 100644
--- a/relay/dhcrelay.c
+++ b/relay/dhcrelay.c
@@ -585,6 +585,7 @@ main(int argc, char **argv) {
/* Start dispatching packets and timeouts... */
dispatch();
+ /* In fact dispatch() never returns. */
return (0);
}
@@ -1686,5 +1687,7 @@ parse_allow_deny(struct option_cache **oc, struct parse *p, int i) {
isc_result_t
dhcp_set_control_state(control_object_state_t oldstate,
control_object_state_t newstate) {
- return ISC_R_SUCCESS;
+ if (newstate != server_shutdown)
+ return ISC_R_SUCCESS;
+ exit(0);
}