diff options
author | dlg <dlg@openbsd.org> | 2019-03-18 00:00:59 +0000 |
---|---|---|
committer | dlg <dlg@openbsd.org> | 2019-03-18 00:00:59 +0000 |
commit | b57001d2402253b2754c7550188932001fb07564 (patch) | |
tree | c6a4cccd021ced73f832459e308ac89cd578f11d /usr.sbin/dhcrelay6 | |
parent | extend BIOCSFILDROP so it can be configured to not capture packets. (diff) | |
download | wireguard-openbsd-b57001d2402253b2754c7550188932001fb07564.tar.xz wireguard-openbsd-b57001d2402253b2754c7550188932001fb07564.zip |
explicitly use BPF_FILDROP_CAPTURE when configuring BIOCSFILDROP
BIOCSFILDROP used to just be a flag, ie, any non-zero value was
treated the same, but i'm changing it so different values do different
things. this way the programs should keep working even if i decide
to change the values for these macros.
Diffstat (limited to 'usr.sbin/dhcrelay6')
-rw-r--r-- | usr.sbin/dhcrelay6/bpf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/dhcrelay6/bpf.c b/usr.sbin/dhcrelay6/bpf.c index dbc7098c9a8..4b15e6d1b9d 100644 --- a/usr.sbin/dhcrelay6/bpf.c +++ b/usr.sbin/dhcrelay6/bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf.c,v 1.2 2017/04/19 05:36:13 natano Exp $ */ +/* $OpenBSD: bpf.c,v 1.3 2019/03/18 00:00:59 dlg Exp $ */ /* BPF socket interface code, originally contributed by Archie Cobbs. */ @@ -203,7 +203,7 @@ if_register_receive(struct interface_info *info) fatal("Can't set BPF direction capture"); /* Drop them so they don't go up in the network stack. */ - flag = 1; + flag = BPF_FILDROP_CAPTURE; if (ioctl(info->rfdesc, BIOCSFILDROP, &flag) == -1) fatal("Can't set BPF filter drop"); |