diff options
author | phk <phk@FreeBSD.org> | 2002-10-16 09:00:53 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-10-16 09:00:53 +0000 |
commit | 42dda6b2e85c3a2f926b90cfd200aaa3c06d3f3b (patch) | |
tree | 9fa12b045d20749f873c92ceb77cbc8c9a15c624 /sys/net/if_ethersubr.c | |
parent | df5889681215452131c467679cd51691ca09ad66 (diff) | |
download | FreeBSD-src-42dda6b2e85c3a2f926b90cfd200aaa3c06d3f3b.zip FreeBSD-src-42dda6b2e85c3a2f926b90cfd200aaa3c06d3f3b.tar.gz |
FIx misindentation.
Spotted by: FlexeLint.
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r-- | sys/net/if_ethersubr.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 6f0e1df..5db1505 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -672,18 +672,21 @@ ether_demux(ifp, eh, m) if (rule) /* packet was already bridged */ goto post_stats; - if (! (BDG_ACTIVE(ifp) ) ) - /* Discard packet if upper layers shouldn't see it because it was - unicast to a different Ethernet address. If the driver is working - properly, then this situation can only happen when the interface - is in promiscuous mode. */ - if ((ifp->if_flags & IFF_PROMISC) != 0 - && (eh->ether_dhost[0] & 1) == 0 - && bcmp(eh->ether_dhost, - IFP2AC(ifp)->ac_enaddr, ETHER_ADDR_LEN) != 0 - && (ifp->if_flags & IFF_PPROMISC) == 0) { - m_freem(m); - return; + if (!(BDG_ACTIVE(ifp))) { + /* + * Discard packet if upper layers shouldn't see it because it + * was unicast to a different Ethernet address. If the driver + * is working properly, then this situation can only happen + * when the interface is in promiscuous mode. + */ + if ((ifp->if_flags & IFF_PROMISC) != 0 + && (eh->ether_dhost[0] & 1) == 0 + && bcmp(eh->ether_dhost, + IFP2AC(ifp)->ac_enaddr, ETHER_ADDR_LEN) != 0 + && (ifp->if_flags & IFF_PPROMISC) == 0) { + m_freem(m); + return; + } } /* Discard packet if interface is not up */ |