]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
bpf: for SMALL systems skip the bpfN checks
authorRoy Marples <roy@marples.name>
Fri, 14 Apr 2023 10:08:24 +0000 (11:08 +0100)
committerRoy Marples <roy@marples.name>
Fri, 14 Apr 2023 10:08:24 +0000 (11:08 +0100)
src/bpf.c

index 15446e5c0ce88bcf74bb75b71b9a93eee7fa233c..339f3a0147dfe35d9b506b32fbe870d3b9f0cbbb 100644 (file)
--- 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;