/* We assume we have only receive one packet (unbuffered mode). Dunno if
* this is correct. */
if (read(fd, bpfbuf->data, bpfbuf->len) == -1) {
- log_warn("interfaces", "error while receiving frame on %s",
- hardware->h_ifname);
- hardware->h_rx_discarded_cnt++;
+ if (errno == ENETDOWN) {
+ log_debug("interfaces", "error while receiving frame on %s (network down)",
+ hardware->h_ifname);
+ } else {
+ log_warn("interfaces", "error while receiving frame on %s",
+ hardware->h_ifname);
+ hardware->h_rx_discarded_cnt++;
+ }
return -1;
}
bh = (struct bpf_hdr*)bpfbuf->data;
retry++;
goto retry;
}
- log_warn("interfaces", "error while receiving frame on %s (retry: %d)",
- hardware->h_ifname, retry);
- hardware->h_rx_discarded_cnt++;
+ if (errno == ENETDOWN) {
+ log_debug("interfaces", "error while receiving frame on %s (network down)",
+ hardware->h_ifname);
+ } else {
+ log_warn("interfaces", "error while receiving frame on %s (retry: %d)",
+ hardware->h_ifname, retry);
+ hardware->h_rx_discarded_cnt++;
+ }
return -1;
}
if (from->sll_pkttype == PACKET_OUTGOING)