diff options
-rw-r--r-- | lib/libpcap/pcap-bpf.c | 6 | ||||
-rw-r--r-- | sbin/dhclient/bpf.c | 6 | ||||
-rw-r--r-- | usr.sbin/tcpdump/privsep_pcap.c | 4 | ||||
-rw-r--r-- | usr.sbin/tcpdump/tcpdump.8 | 6 |
4 files changed, 11 insertions, 11 deletions
diff --git a/lib/libpcap/pcap-bpf.c b/lib/libpcap/pcap-bpf.c index c28e136d8fe..3aa492cbb2b 100644 --- a/lib/libpcap/pcap-bpf.c +++ b/lib/libpcap/pcap-bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcap-bpf.c,v 1.33 2016/05/03 07:38:38 natano Exp $ */ +/* $OpenBSD: pcap-bpf.c,v 1.34 2016/05/08 08:20:50 natano Exp $ */ /* * Copyright (c) 1993, 1994, 1995, 1996, 1998 @@ -216,9 +216,9 @@ bpf_open(pcap_t *p) { int fd; - fd = open("/dev/bpf", O_RDWR); + fd = open("/dev/bpf0", O_RDWR); if (fd == -1 && errno == EACCES) - fd = open("/dev/bpf", O_RDONLY); + fd = open("/dev/bpf0", O_RDONLY); if (fd == -1) { if (errno == EACCES) diff --git a/sbin/dhclient/bpf.c b/sbin/dhclient/bpf.c index 57f3a1be2e4..8185bd92a9d 100644 --- a/sbin/dhclient/bpf.c +++ b/sbin/dhclient/bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf.c,v 1.39 2016/05/03 07:47:26 natano Exp $ */ +/* $OpenBSD: bpf.c,v 1.40 2016/05/08 08:20:50 natano Exp $ */ /* BPF socket interface code, originally contributed by Archie Cobbs. */ @@ -77,13 +77,13 @@ if_register_bpf(void) struct ifreq ifr; int sock; - if ((sock = open("/dev/bpf", O_RDWR | O_CLOEXEC)) == -1) + if ((sock = open("/dev/bpf0", O_RDWR | O_CLOEXEC)) == -1) error("Can't open bpf: %s", strerror(errno)); /* Set the BPF device to point at this interface. */ strlcpy(ifr.ifr_name, ifi->name, IFNAMSIZ); if (ioctl(sock, BIOCSETIF, &ifr) < 0) - error("Can't attach interface %s to /dev/bpf: %s", + error("Can't attach interface %s to /dev/bpf0: %s", ifi->name, strerror(errno)); return (sock); diff --git a/usr.sbin/tcpdump/privsep_pcap.c b/usr.sbin/tcpdump/privsep_pcap.c index 1ca6c7fb3ff..70d9f7d6fe6 100644 --- a/usr.sbin/tcpdump/privsep_pcap.c +++ b/usr.sbin/tcpdump/privsep_pcap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep_pcap.c,v 1.20 2016/05/03 07:41:24 natano Exp $ */ +/* $OpenBSD: privsep_pcap.c,v 1.21 2016/05/08 08:20:50 natano Exp $ */ /* * Copyright (c) 2004 Can Erkin Acar @@ -182,7 +182,7 @@ pcap_live(const char *device, int snaplen, int promisc, u_int dlt, if (device == NULL || snaplen <= 0) return (-1); - if ((fd = open("/dev/bpf", O_RDONLY)) == -1) + if ((fd = open("/dev/bpf0", O_RDONLY)) == -1) return (-1); v = 32768; /* XXX this should be a user-accessible hook */ diff --git a/usr.sbin/tcpdump/tcpdump.8 b/usr.sbin/tcpdump/tcpdump.8 index 5bfe8a429f3..c8b3de13b46 100644 --- a/usr.sbin/tcpdump/tcpdump.8 +++ b/usr.sbin/tcpdump/tcpdump.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tcpdump.8,v 1.90 2016/05/03 07:41:24 natano Exp $ +.\" $OpenBSD: tcpdump.8,v 1.91 2016/05/08 08:20:50 natano Exp $ .\" .\" Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992, 1994, 1995, 1996 .\" The Regents of the University of California. All rights reserved. @@ -19,7 +19,7 @@ .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. .\" -.Dd $Mdocdate: May 3 2016 $ +.Dd $Mdocdate: May 8 2016 $ .Dt TCPDUMP 8 .Os .Sh NAME @@ -44,7 +44,7 @@ prints out the headers of packets on a network interface that match the boolean .Ar expression . You must have read access to -.Pa /dev/bpf . +.Pa /dev/bpf0 . .Pp The options are as follows: .Bl -tag -width "-c count" |