From: Roy Marples Date: Mon, 15 Sep 2008 15:20:37 +0000 (+0000) Subject: Correctly set the REBOOT reason. X-Git-Tag: v5.0.0~252 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78c8e969a552d0076faab4065ed627e5f14cb814;p=thirdparty%2Fdhcpcd.git Correctly set the REBOOT reason. --- diff --git a/bind.c b/bind.c index ab10e671..f05439b8 100644 --- a/bind.c +++ b/bind.c @@ -108,7 +108,6 @@ bind_interface(void *arg) delete_timeout(handle_exit_timeout, NULL); if (clock_monotonic) get_monotonic(&lease->boundtime); - state->state = DHS_BOUND; state->xid = 0; free(state->old); state->old = state->new; @@ -169,7 +168,9 @@ bind_interface(void *arg) reason = "RENEW"; else reason = "REBIND"; - } else + } else if (state->state == DHS_REBOOT) + reason = "REBOOT"; + else reason = "BOUND"; } if (options & DHCPCD_TEST) { @@ -185,6 +186,7 @@ bind_interface(void *arg) } configure(iface, reason); daemonise(); + state->state = DHS_BOUND; if (ifo->options & DHCPCD_ARP) { state->claims = 0; send_arp_announce(iface);