((ia = ipv4_iffindaddr(ifp, &state->addr, NULL)) &&
!(ia->addr_flags & IN_IFF_NOTUSEABLE)) &&
#endif
- (state->new->cookie == htonl(MAGIC_COOKIE) ||
+ (state->lease.server.s_addr ||
ifp->options->options & DHCPCD_INFORM))
{
s = dhcp_openudp(ifp);
unlink(state->leasefile);
if (ifp->carrier != LINK_DOWN &&
state->new != NULL &&
- state->new->cookie == htonl(MAGIC_COOKIE))
+ state->lease.server.s_addr != INADDR_ANY)
{
logger(ifp->ctx, LOG_INFO, "%s: releasing lease of %s",
ifp->name, inet_ntoa(state->lease.addr));