aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_fdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bridge/br_fdb.c')
-rw-r--r--net/bridge/br_fdb.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
index 2c45c069ea1a..b524c36c1273 100644
--- a/net/bridge/br_fdb.c
+++ b/net/bridge/br_fdb.c
@@ -538,6 +538,7 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
538{ 538{
539 struct hlist_head *head = &br->hash[br_mac_hash(addr, vid)]; 539 struct hlist_head *head = &br->hash[br_mac_hash(addr, vid)];
540 struct net_bridge_fdb_entry *fdb; 540 struct net_bridge_fdb_entry *fdb;
541 bool fdb_modified = false;
541 542
542 /* some users want to always flood. */ 543 /* some users want to always flood. */
543 if (hold_time(br) == 0) 544 if (hold_time(br) == 0)
@@ -558,10 +559,15 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
558 source->dev->name); 559 source->dev->name);
559 } else { 560 } else {
560 /* fastpath: update of existing entry */ 561 /* fastpath: update of existing entry */
561 fdb->dst = source; 562 if (unlikely(source != fdb->dst)) {
563 fdb->dst = source;
564 fdb_modified = true;
565 }
562 fdb->updated = jiffies; 566 fdb->updated = jiffies;
563 if (unlikely(added_by_user)) 567 if (unlikely(added_by_user))
564 fdb->added_by_user = 1; 568 fdb->added_by_user = 1;
569 if (unlikely(fdb_modified))
570 fdb_notify(br, fdb, RTM_NEWNEIGH);
565 } 571 }
566 } else { 572 } else {
567 spin_lock(&br->hash_lock); 573 spin_lock(&br->hash_lock);