diff options
author | Shawn Routhier <sar@isc.org> | 2013-11-14 12:55:10 -0800 |
---|---|---|
committer | Shawn Routhier <sar@isc.org> | 2013-11-14 12:55:10 -0800 |
commit | 0895c955d16a957107771e442397c6260d92cbc2 (patch) | |
tree | beb3d593cb202f75f92bad953fb1eaef1a875671 /relay/dhcrelay.c | |
parent | f88446f16b9b3be36492f78b0f66a4166e459896 (diff) | |
download | isc-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.c | 5 |
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); } |