Mercurial > hg > dhcpcd
comparison src/privsep-bpf.c @ 5556:99bfd2eb77ab draft
privsep: Don't log a BPF error that network is down
The master process will catch this clean remove the BPF process.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Wed, 09 Dec 2020 11:15:30 +0000 |
| parents | 357fddea9365 |
| children |
comparison
equal
deleted
inserted
replaced
| 5555:0fff9309b86d | 5556:99bfd2eb77ab |
|---|---|
| 71 while (!(bpf->bpf_flags & BPF_EOF)) { | 71 while (!(bpf->bpf_flags & BPF_EOF)) { |
| 72 len = bpf_read(bpf, buf, sizeof(buf)); | 72 len = bpf_read(bpf, buf, sizeof(buf)); |
| 73 if (len == -1) { | 73 if (len == -1) { |
| 74 int error = errno; | 74 int error = errno; |
| 75 | 75 |
| 76 logerr("%s: %s", psp->psp_ifname, __func__); | 76 if (errno != ENETDOWN) |
| 77 logerr("%s: %s", psp->psp_ifname, __func__); | |
| 77 if (error != ENXIO) | 78 if (error != ENXIO) |
| 78 break; | 79 break; |
| 79 /* If the interface has departed, close the BPF | 80 /* If the interface has departed, close the BPF |
| 80 * socket. This stops log spam if RTM_IFANNOUNCE is | 81 * socket. This stops log spam if RTM_IFANNOUNCE is |
| 81 * delayed in announcing the departing interface. */ | 82 * delayed in announcing the departing interface. */ |
