mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-23 18:14:09 +08:00
Only remove the interface from DHCP consideration if the error
sending a packet is not a network error.
This commit is contained in:
parent
047235d751
commit
f31c6094c5
18
dhcp.c
18
dhcp.c
@ -1613,11 +1613,19 @@ send_message(struct interface *iface, uint8_t type,
|
||||
if (r == -1) {
|
||||
syslog(LOG_ERR, "%s: if_sendrawpacket: %m",
|
||||
iface->name);
|
||||
if (!(iface->ctx->options & DHCPCD_TEST))
|
||||
dhcp_drop(iface, "FAIL");
|
||||
dhcp_close(iface);
|
||||
eloop_timeout_delete(iface->ctx->eloop, NULL, iface);
|
||||
callback = NULL;
|
||||
switch(errno) {
|
||||
case ENETDOWN:
|
||||
case ENETRESET:
|
||||
case ENETUNREACH:
|
||||
break;
|
||||
default:
|
||||
if (!(iface->ctx->options & DHCPCD_TEST))
|
||||
dhcp_drop(iface, "FAIL");
|
||||
dhcp_close(iface);
|
||||
eloop_timeout_delete(iface->ctx->eloop,
|
||||
NULL, iface);
|
||||
callback = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
free(dhcp);
|
||||
|
Loading…
Reference in New Issue
Block a user