/* Ok, lets use this */
if (IN_LINKLOCAL(dhcp->yiaddr)) {
- free(state->old_dhcp);
- state->old_dhcp = state->dhcp;
- state->dhcp = dhcp;
- return 0;
+ if (options->options & DHCPCD_IPV4LL) {
+ free(state->old_dhcp);
+ state->old_dhcp = state->dhcp;
+ state->dhcp = dhcp;
+ return 0;
+ }
+ lease->addr.s_addr = 0;
+ free(dhcp);
+ return -1;
}
#endif
{
logger(LOG_ERR, "lease expired %u seconds ago",
offset + lease->leasetime);
+ lease->addr.s_addr = 0;
free(dhcp);
return -1;
}
snprintf(options->classid, CLASS_ID_MAX_LEN, "%s %s",
PACKAGE, VERSION);
- options->options |= DHCPCD_GATEWAY | DHCPCD_ARP | DHCPCD_IPV4LL |
- DHCPCD_DAEMONISE | DHCPCD_CLIENTID;
+ options->options |= DHCPCD_GATEWAY | DHCPCD_DAEMONISE | DHCPCD_CLIENTID;
+#ifdef ENABLE_ARP
+ options->options |= DHCPCD_ARP;
+ #ifdef ENABLE_IPV4LL
+ options->options |= DHCPCD_IPV4LL;
+ #endif
+#endif
+
options->timeout = DEFAULT_TIMEOUT;
#ifdef CMDLINE_COMPAT