]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
privsep: Add comment about BPF returing EPERM on OpenBSD.
authorRoy Marples <roy@marples.name>
Wed, 20 May 2020 13:15:30 +0000 (14:15 +0100)
committerRoy Marples <roy@marples.name>
Wed, 20 May 2020 13:15:30 +0000 (14:15 +0100)
Looks like an OpenBSD bug.

src/privsep-bpf.c

index 43fee54b43c9803e551ad201bc7c779370eb2527..d8cb79738f588630e4b9d7483221f65075339c42 100644 (file)
@@ -106,6 +106,13 @@ ps_bpf_recvmsg(void *arg)
 {
        struct ps_process *psp = arg;
 
+       /*
+        * OpenBSD-6.6 at least will return EPERM here for every
+        * BOOTP sent except for the first one.
+        * However with wih EPERM, the BOOTP message is *still* sent.
+        * This means the BPF write filter isn't working as it should.
+        * On FreeBSD it works fine.
+        */
        if (ps_recvpsmsg(psp->psp_ctx, psp->psp_fd,
            ps_bpf_recvmsgcb, arg) == -1)
                logerr(__func__);