From: Roy Marples Date: Wed, 20 May 2020 13:15:30 +0000 (+0100) Subject: privsep: Add comment about BPF returing EPERM on OpenBSD. X-Git-Tag: v9.1.0~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40233274196ace0b2d429f7d628c3afdcda22b24;p=thirdparty%2Fdhcpcd.git privsep: Add comment about BPF returing EPERM on OpenBSD. Looks like an OpenBSD bug. --- diff --git a/src/privsep-bpf.c b/src/privsep-bpf.c index 43fee54b..d8cb7973 100644 --- a/src/privsep-bpf.c +++ b/src/privsep-bpf.c @@ -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__);