summaryrefslogtreecommitdiff
path: root/sbin/dhclient
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2005-11-26 17:35:36 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2005-11-26 17:35:36 +0000
commit803fb16ffc9b414c65471a36a091a53e8598a9c2 (patch)
treec1b32ecc9c166d13334e7f7ab4c5dfd5ac434d57 /sbin/dhclient
parent19be77508910c463d79ed46c5a61f31542ac9ac1 (diff)
enable the bpf filter-drop option in dhclient
ok henning@, tested by many others (tech@)
Diffstat (limited to 'sbin/dhclient')
-rw-r--r--sbin/dhclient/bpf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/dhclient/bpf.c b/sbin/dhclient/bpf.c
index eedaeb4a057..4d4681bd94b 100644
--- a/sbin/dhclient/bpf.c
+++ b/sbin/dhclient/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.14 2005/07/29 17:26:28 krw Exp $ */
+/* $OpenBSD: bpf.c,v 1.15 2005/11/26 17:35:35 reyk Exp $ */
/* BPF socket interface code, originally contributed by Archie Cobbs. */
@@ -195,6 +195,9 @@ if_register_receive(struct interface_info *info)
if (ioctl(info->rfdesc, BIOCIMMEDIATE, &flag) < 0)
error("Can't set immediate mode on bpf device: %m");
+ if (ioctl(info->rfdesc, BIOCSFILDROP, &flag) < 0)
+ error("Can't set filter-drop mode on bpf device: %m");
+
/* Get the required BPF buffer length from the kernel. */
if (ioctl(info->rfdesc, BIOCGBLEN, &sz) < 0)
error("Can't get bpf buffer length: %m");