From 821b3b60e86b0b2f0557b787c258beca66640167 Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Wed, 4 Apr 2001 02:39:18 +0000 Subject: check for return value of ENODEV from ifpromisc(). This will happen at detach time when if_detach_ioctl() has been installed for an outgoing interface and does not represent an error. --- sys/net/bpf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/net/bpf.c b/sys/net/bpf.c index e93575c22f3..5837e9618ef 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf.c,v 1.24 2001/03/25 02:44:42 csapuntz Exp $ */ +/* $OpenBSD: bpf.c,v 1.25 2001/04/04 02:39:17 jason Exp $ */ /* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */ /* @@ -242,7 +242,7 @@ bpf_detachd(d) d->bd_promisc = 0; error = ifpromisc(bp->bif_ifp, 0); - if (error && error != EINVAL) + if (error && !(error == EINVAL || error == ENODEV)) /* * Something is really wrong if we were able to put * the driver into promiscuous mode, but can't -- cgit v1.2.3