addresses - has_expired() function never says that a local interface mac address
is expired, because it verifies if fdb->is_static is set and returns right
away.
Is this the desired behaviour? If so, is there a way to capture packets with
destination to a local interface from another interface?
I've also done a small patch and it seems to fix the situation, but I am not
sure if it's the right way to do it.
Regards,
Veaceslav
---
net/bridge/br_fdb.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
index 88485cc..3d380c2 100644
--- a/net/bridge/br_fdb.c
+++ b/net/bridge/br_fdb.c
@@ -61,8 +61,8 @@ static inline unsigned long hold_time(const struct net_bridge
*br)
static inline int has_expired(const struct net_bridge *br,
const struct net_bridge_fdb_entry *fdb)
{
- return !fdb->is_static &&
- time_before_eq(fdb->ageing_timer + hold_time(br), jiffies);
+ return (br->ageing_time == 0) || (!fdb->is_static &&
+ time_before_eq(fdb->ageing_timer + hold_time(br), jiffies));
}
static inline int br_mac_hash(const unsigned char *mac)