]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Don't reboot if we don't have an active state.
authorRoy Marples <roy@marples.name>
Mon, 18 Feb 2013 10:37:02 +0000 (10:37 +0000)
committerRoy Marples <roy@marples.name>
Mon, 18 Feb 2013 10:37:02 +0000 (10:37 +0000)
dhcp.c

diff --git a/dhcp.c b/dhcp.c
index 6ae46b912624d8b2e96b2110091d960b4185181b..deabd7731a58685be66b204c71c9fcea120e5495 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -1942,6 +1942,8 @@ dhcp_reboot(struct interface *ifp, int oldopts)
        struct if_options *ifo = ifp->options;
        struct dhcp_state *state = D_STATE(ifp);
 
+       if (state == NULL)
+               return;
        ifo = ifp->options;
        state->interval = 0;
        if ((ifo->options & (DHCPCD_INFORM | DHCPCD_STATIC) &&