]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
priv: make inability to set write filter as fatal
authorVincent Bernat <bernat@luffy.cx>
Thu, 17 Jan 2013 21:00:24 +0000 (22:00 +0100)
committerVincent Bernat <bernat@luffy.cx>
Thu, 17 Jan 2013 21:00:24 +0000 (22:00 +0100)
On BSD, if the userland supports an ioctl, the kernel is in sync and
also supports the ioctl. So, if BIOCSETWF exists, it should succeed.

src/daemon/priv.c

index 67f84a2d44aa2ff5d8d79cfd7e3ad13e19f3b661..41eca52251c5d7984eb6882a618ec7da3550b686 100644 (file)
@@ -466,8 +466,10 @@ asroot_iface_init()
 #ifdef BIOCSETWF
        /* Install write filter (optional) */
        if (ioctl(fd, BIOCSETWF, (caddr_t)&fprog) < 0) {
+               rc = errno;
                log_info("privsep", "unable to setup write BPF filter for %s",
                    name);
+               goto end;
        }
 #endif