From: Roy Marples Date: Fri, 14 Apr 2023 10:08:24 +0000 (+0100) Subject: bpf: for SMALL systems skip the bpfN checks X-Git-Tag: v9.5.1~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cff67effeff2f3a74daa45010226a1d37f8b3f3e;p=thirdparty%2Fdhcpcd.git bpf: for SMALL systems skip the bpfN checks --- diff --git a/src/bpf.c b/src/bpf.c index 15446e5c..339f3a01 100644 --- a/src/bpf.c +++ b/src/bpf.c @@ -174,6 +174,7 @@ bpf_open(const struct interface *ifp, /* /dev/bpf is a cloner on modern kernels */ bpf->bpf_fd = open("/dev/bpf", BPF_OPEN_FLAGS); +#ifndef SMALL /* Support older kernels where /dev/bpf is not a cloner */ if (bpf->bpf_fd == -1) { char device[32]; @@ -184,6 +185,7 @@ bpf_open(const struct interface *ifp, bpf->bpf_fd = open(device, BPF_OPEN_FLAGS); } while (bpf->bpf_fd == -1 && errno == EBUSY); } +#endif if (bpf->bpf_fd == -1) goto eexit;