diff options
| author | David Greenman <dg@FreeBSD.org> | 1995-08-24 05:41:52 +0000 |
|---|---|---|
| committer | David Greenman <dg@FreeBSD.org> | 1995-08-24 05:41:52 +0000 |
| commit | de51b090b1914e8c48b581cbd01244ab13b26d5c (patch) | |
| tree | ec2c2e213c45492f62d0c40d37cbb43bedf0a9b2 /sys/net | |
| parent | 97ee7f3e5972c965166d8e82867bbe7ccdf95e45 (diff) | |
Notes
Diffstat (limited to 'sys/net')
| -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 b11f2d911c61..fff5f38a4657 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.7 1995/05/30 08:07:50 rgrimes Exp $ + * $Id: bpf.c,v 1.7.4.1 1995/07/23 04:58:31 davidg 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; |
