]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Correctly set the REBOOT reason.
authorRoy Marples <roy@marples.name>
Mon, 15 Sep 2008 15:20:37 +0000 (15:20 +0000)
committerRoy Marples <roy@marples.name>
Mon, 15 Sep 2008 15:20:37 +0000 (15:20 +0000)
bind.c

diff --git a/bind.c b/bind.c
index ab10e671539bf4a26ffb143e5d7a96e3cbe42731..f05439b82dfa4619c90461810d0c41bb7d608bab 100644 (file)
--- 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);