]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
privsep: Don't log a BPF error that network is down
authorRoy Marples <roy@marples.name>
Wed, 9 Dec 2020 11:15:30 +0000 (11:15 +0000)
committerRoy Marples <roy@marples.name>
Wed, 9 Dec 2020 11:15:30 +0000 (11:15 +0000)
The master process will catch this clean remove the BPF process.

src/privsep-bpf.c

index 23da9a074f25fcb66e44e84411ce7918317d92c4..79c4696d38c241f186eeb19e9abb40129f622d6f 100644 (file)
@@ -73,7 +73,8 @@ ps_bpf_recvbpf(void *arg)
                if (len == -1) {
                        int error = errno;
 
-                       logerr("%s: %s", psp->psp_ifname, __func__);
+                       if (errno != ENETDOWN)
+                               logerr("%s: %s", psp->psp_ifname, __func__);
                        if (error != ENXIO)
                                break;
                        /* If the interface has departed, close the BPF