} else {
const struct iarp_state *state = ARP_CSTATE(astate->iface);
- bpf_arp(astate->iface, state->fd);
+ if (bpf_arp(astate->iface, state->fd) == -1)
+ logerr(__func__);
}
astate->probes = 0;
logdebug("%s: probing for %s",
state = ARP_STATE(ifp);
TAILQ_INSERT_TAIL(&state->arp_states, astate, next);
- bpf_arp(ifp, state->fd);
+ if (bpf_arp(ifp, state->fd) == -1)
+ logerr(__func__); /* try and continue */
return astate;
}
free(state);
ifp->if_data[IF_DATA_ARP] = NULL;
} else
- bpf_arp(ifp, state->fd);
+ if (bpf_arp(ifp, state->fd) == -1)
+ logerr(__func__);
}
static void
state->xid = arc4random();
/* As the XID changes, re-apply the filter. */
- if (state->bpf_fd != -1)
- bpf_bootp(ifp, state->bpf_fd);
+ if (state->bpf_fd != -1) {
+ if (bpf_bootp(ifp, state->bpf_fd) == -1)
+ logerr(__func__); /* try to continue */
+ }
}
void
}
state->state = DHS_BOUND;
/* Re-apply the filter because we need to accept any XID anymore. */
- bpf_bootp(ifp, state->bpf_fd);
+ if (bpf_bootp(ifp, state->bpf_fd) == -1)
+ logerr(__func__); /* try to continue */
if (!state->lease.frominfo &&
!(ifo->options & (DHCPCD_INFORM | DHCPCD_STATIC)))
if (write_lease(ifp, state->new, state->new_len) == -1)