From: Roy Marples Date: Thu, 4 Apr 2013 21:58:51 +0000 (+0000) Subject: Fix RELEASE support. X-Git-Tag: v5.99.6~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=78892d6c592b2df1cd498170774939d9771b0799;p=thirdparty%2Fdhcpcd.git Fix RELEASE support. --- diff --git a/dhcp.c b/dhcp.c index 12efea99..480c24f9 100644 --- a/dhcp.c +++ b/dhcp.c @@ -1665,9 +1665,13 @@ dhcp_expire(void *arg) void dhcp_release(struct interface *ifp) { - struct dhcp_state *state = D_STATE(ifp); + struct dhcp_state *state; struct timespec ts; + state = D_STATE(ifp); + if (state == NULL) + return; + if (state->new != NULL && state->new->cookie == htonl(MAGIC_COOKIE)) { syslog(LOG_INFO, "%s: releasing lease of %s", ifp->name, inet_ntoa(state->lease.addr));