[Top] [All Lists]

[PATCH] bridge: no update when hold time is zero

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: [PATCH] bridge: no update when hold time is zero
From: Stephen Hemminger <shemminger@xxxxxxxx>
Date: Fri, 11 Mar 2005 10:26:36 -0800
Cc: netdev@xxxxxxxxxxx, bridge@xxxxxxxxxxxxxx
In-reply-to: <20050310185152.12ed9819.davem@xxxxxxxxxxxxx>
Organization: Open Source Development Lab
References: <20050310154437.1223b6e9@xxxxxxxxxxxxxxxxx> <20050310185152.12ed9819.davem@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
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.

diff -Nru a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
--- a/net/bridge/br_fdb.c       2005-03-11 10:23:44 -08:00
+++ b/net/bridge/br_fdb.c       2005-03-11 10:23:44 -08:00
@@ -337,6 +337,10 @@
        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;
        fdb = fdb_find(head, addr);
        if (likely(fdb)) {

<Prev in Thread] Current Thread [Next in Thread>