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 | |
parent | df5889681215452131c467679cd51691ca09ad66 (diff) | |
download | FreeBSD-src-42dda6b2e85c3a2f926b90cfd200aaa3c06d3f3b.zip FreeBSD-src-42dda6b2e85c3a2f926b90cfd200aaa3c06d3f3b.tar.gz |
FIx misindentation.
Spotted by: FlexeLint.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/bridge.c | 20 | ||||
-rw-r--r-- | sys/net/if_ethersubr.c | 27 |
2 files changed, 25 insertions, 22 deletions
diff --git a/sys/net/bridge.c b/sys/net/bridge.c index 1a59cee..5c8e456 100644 --- a/sys/net/bridge.c +++ b/sys/net/bridge.c @@ -593,16 +593,16 @@ bdg_timeout(void *dummy) if (l > HASH_SIZE) l = HASH_SIZE ; - for (i=0; i<n_clusters; i++) { - bdg_hash_table *bdg_table = clusters[i].ht; - for (; age_index < l ; age_index++) - if (bdg_table[age_index].used) - bdg_table[age_index].used = 0 ; - else if (bdg_table[age_index].name) { - /* printf("xx flushing stale entry %d\n", age_index); */ - bdg_table[age_index].name = NULL ; - } - } + for (i=0; i<n_clusters; i++) { + bdg_hash_table *bdg_table = clusters[i].ht; + for (; age_index < l ; age_index++) + if (bdg_table[age_index].used) + bdg_table[age_index].used = 0 ; + else if (bdg_table[age_index].name) { + /* printf("xx flushing stale entry %d\n", age_index); */ + bdg_table[age_index].name = NULL ; + } + } if (age_index >= HASH_SIZE) age_index = 0 ; 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 */ |