bridge: don't indicate expiry on NTF_EXT_LEARNED fdb entries
authorRoopa Prabhu <[email protected]>
Thu, 16 Feb 2017 21:38:04 +0000 (13:38 -0800)
committerDavid S. Miller <[email protected]>
Fri, 17 Feb 2017 18:56:56 +0000 (13:56 -0500)
added_by_external_learn fdb entries are added and expired by
external entities like switchdev driver or external controllers.
ageing is already disabled for such entries. Hence, don't
indicate expiry for such fdb entries.

CC: Nikolay Aleksandrov <[email protected]>
CC: Jiri Pirko <[email protected]>
CC: Ido Schimmel <[email protected]>
Signed-off-by: Roopa Prabhu <[email protected]>
Reviewed-by: Ido Schimmel <[email protected]>
Tested-by: Ido Schimmel <[email protected]>
Reviewed-by: Nikolay Aleksandrov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/bridge/br_fdb.c

index 4ac11574117c133648a470fb96f6cba2720ead16..4f598dc2d9168cd323a3027d77d601854aa35f04 100644 (file)
@@ -65,7 +65,7 @@ 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 &&
+       return !fdb->is_static && !fdb->added_by_external_learn &&
                time_before_eq(fdb->updated + hold_time(br), jiffies);
 }