Revert "net: bridge: br_fdb_external_learn_add(): always set EXT_LEARN"

This reverts commit ea412b366f.
This commit is contained in:
Ksawlii 2024-11-24 00:23:41 +01:00
parent ddc4bffd5d
commit 7115e305bd

View file

@ -1238,10 +1238,12 @@ int br_fdb_external_learn_add(struct net_bridge *br, struct net_bridge_port *p,
modified = true;
}
if (test_and_set_bit(BR_FDB_ADDED_BY_EXT_LEARN, &fdb->flags)) {
if (test_bit(BR_FDB_ADDED_BY_EXT_LEARN, &fdb->flags)) {
/* Refresh entry */
fdb->used = jiffies;
} else {
} else if (!test_bit(BR_FDB_ADDED_BY_USER, &fdb->flags)) {
/* Take over SW learned entry */
set_bit(BR_FDB_ADDED_BY_EXT_LEARN, &fdb->flags);
modified = true;
}