summaryrefslogtreecommitdiff
path: root/usr.sbin/tcpdump/privsep.c
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2004-02-04 09:47:11 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2004-02-04 09:47:11 +0000
commitd7cebb809ee429657848bef3a4a3e97b023bec60 (patch)
tree30cf21ef5a233ab2a057ea292e11e02479bf0056 /usr.sbin/tcpdump/privsep.c
parentc5a79481f4ad51906a5e820f0859c7b6c8eaff38 (diff)
Better error message when bpf device open fails.
ok dhartmei@ brad@
Diffstat (limited to 'usr.sbin/tcpdump/privsep.c')
-rw-r--r--usr.sbin/tcpdump/privsep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/tcpdump/privsep.c b/usr.sbin/tcpdump/privsep.c
index b7fa5d85584..866b4561936 100644
--- a/usr.sbin/tcpdump/privsep.c
+++ b/usr.sbin/tcpdump/privsep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: privsep.c,v 1.2 2004/01/31 15:13:03 otto Exp $ */
+/* $OpenBSD: privsep.c,v 1.3 2004/02/04 09:47:10 otto Exp $ */
/*
* Copyright (c) 2003 Can Erkin Acar
@@ -288,7 +288,9 @@ parent_open_bpf(int fd, int *bpfd)
errx(1, "Invalid interface size specified");
*bpfd = pcap_live(device, snaplen, promisc);
if (*bpfd < 0)
- logmsg(LOG_NOTICE, "[priv]: failed to open bpf");
+ logmsg(LOG_NOTICE,
+ "[priv]: failed to open bpf device for %s: %s",
+ device, strerror(errno));
send_fd(fd, *bpfd);
/* do not close bpfd until filter is set */
}