diff options
| author | Peter Wemm <peter@FreeBSD.org> | 1995-07-31 10:35:36 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 1995-07-31 10:35:36 +0000 |
| commit | f0448ae4a23e4b737e9b490f334f9ca01cf394ad (patch) | |
| tree | 87a04d5212f966e775b7134429cef9688f05641f /sys/net/bpf.c | |
| parent | d3eede9d32d5b253bd310d7b4518bf3de4ae91f3 (diff) | |
Notes
Diffstat (limited to 'sys/net/bpf.c')
| -rw-r--r-- | sys/net/bpf.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c index af05e8323738..e292203a028f 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -37,7 +37,7 @@ * * @(#)bpf.c 8.2 (Berkeley) 3/28/94 * - * $Id: bpf.c,v 1.8 1995/06/15 18:10:57 pst Exp $ + * $Id: bpf.c,v 1.9 1995/07/16 10:13:08 bde Exp $ */ #include "bpfilter.h" @@ -1314,14 +1314,14 @@ ifpromisc(ifp, pswitch) int pswitch; { struct ifreq ifr; - /* - * If the device is not configured up, we cannot put it in - * promiscuous mode. - */ - if ((ifp->if_flags & IFF_UP) == 0) - return (ENETDOWN); if (pswitch) { + /* + * If the device is not configured up, we cannot put it in + * promiscuous mode. + */ + if ((ifp->if_flags & IFF_UP) == 0) + return (ENETDOWN); if (ifp->if_pcount++ != 0) return (0); ifp->if_flags |= IFF_PROMISC; |
