]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
privsep: Sweep ELE_ERROR away for BPF
authorRoy Marples <roy@marples.name>
Wed, 26 Jun 2024 11:30:42 +0000 (12:30 +0100)
committerRoy Marples <roy@marples.name>
Wed, 26 Jun 2024 11:30:42 +0000 (12:30 +0100)
It's just noise and we'll handle NETDOWN in the loop.
We sometimes see it on Linux when a wireless interface "roams"
in fake testing.

src/privsep-bpf.c

index 742865351abfc139afad357ba6526f11678aa362..032e6d1adaf4cd9463d980646702042c51d7ef17 100644 (file)
@@ -67,7 +67,7 @@ ps_bpf_recvbpf(void *arg, unsigned short events)
                .ps_cmd = psp->psp_id.psi_cmd,
        };
 
-       if (events != ELE_READ)
+       if (!(events & (ELE_READ | ELE_ERROR)))
                logerrx("%s: unexpected event 0x%04x", __func__, events);
 
        bpf->bpf_flags &= ~BPF_EOF;