]> git.hungrycats.org Git - linux/commitdiff
[BRIDGE]: No update when hold time is zero
authorStephen Hemminger <shemminger@osdl.org>
Mon, 14 Mar 2005 13:39:50 +0000 (05:39 -0800)
committerThomas Graf <tgraf@suug.ch>
Mon, 14 Mar 2005 13:39:50 +0000 (05:39 -0800)
Some users, set hold time to zero on bridge so it always does
flooding. This is usually when using it with wireless.  The new RCU
based code changed the behaviour so the bridge would not flood for
one GC interval. This patch restores the original behaviour.

Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_fdb.c

index 520c4a1a1242d7d7762c4c109634f2175724bbaf..e6c2200b7ca3f75824f029810221fbcb86d39d5b 100644 (file)
@@ -337,6 +337,10 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
        struct hlist_head *head = &br->hash[br_mac_hash(addr)];
        struct net_bridge_fdb_entry *fdb;
 
+       /* some users want to always flood. */
+       if (hold_time(br) == 0)
+               return;
+
        rcu_read_lock();
        fdb = fdb_find(head, addr);
        if (likely(fdb)) {