summaryrefslogtreecommitdiffstats
path: root/bind.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-09-15 15:20:37 +0000
committerRoy Marples <roy@marples.name>2008-09-15 15:20:37 +0000
commit78c8e969a552d0076faab4065ed627e5f14cb814 (patch)
treef5f6217ec6cf994cf5f1e88375cbb245ec04d670 /bind.c
parent9266112e617cb0ac5fe3124b5ab512d83e8d9cc6 (diff)
downloaddhcpcd-78c8e969a552d0076faab4065ed627e5f14cb814.tar.xz
Correctly set the REBOOT reason.
Diffstat (limited to 'bind.c')
-rw-r--r--bind.c6
1 files changed, 4 insertions, 2 deletions
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);