From: Vincent Bernat Date: Thu, 17 Jan 2013 21:00:24 +0000 (+0100) Subject: priv: make inability to set write filter as fatal X-Git-Tag: 0.7.2~50 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2d2d6e9503d9022cc8af8dbee480f38405b73576;p=thirdparty%2Flldpd.git priv: make inability to set write filter as fatal 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. --- diff --git a/src/daemon/priv.c b/src/daemon/priv.c index 67f84a2d..41eca522 100644 --- a/src/daemon/priv.c +++ b/src/daemon/priv.c @@ -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