]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
openbsd: don't use BIOCSSEESENT with OpenBSD
authorVincent Bernat <bernat@luffy.cx>
Sat, 29 Dec 2012 17:59:07 +0000 (18:59 +0100)
committerVincent Bernat <bernat@luffy.cx>
Sat, 29 Dec 2012 17:59:07 +0000 (18:59 +0100)
This does not exist. Switch back to BIOCSDIRFILT.

src/daemon/interfaces-bsd.c

index 336c78f8f5085a3beb14b5e2a7050456615cf14a..960488b0bd92d791369ab2e2dbe978b66fc27c83 100644 (file)
@@ -584,8 +584,13 @@ ifbsd_phys_init(struct lldpd *cfg,
        }
 
        /* Don't see sent packets */
+#ifdef HOST_OS_OPENBSD
+       enable = BPF_DIRECTION_IN;
+       if (ioctl(fd, BIOCSDIRFILT, (caddr_t)&enable) < 0) {
+#else
        enable = 0;
        if (ioctl(fd, BIOCSSEESENT, (caddr_t)&enable) < 0) {
+#endif
                log_warn("interfaces",
                    "unable to set packet direction for BPF filter on %s",
                    hardware->h_ifname);