diff options
Diffstat (limited to 'net/bridge/br_fdb.c')
-rw-r--r-- | net/bridge/br_fdb.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index 9203d5a1943f..474d36f93342 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c | |||
@@ -487,6 +487,7 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source, | |||
487 | { | 487 | { |
488 | struct hlist_head *head = &br->hash[br_mac_hash(addr, vid)]; | 488 | struct hlist_head *head = &br->hash[br_mac_hash(addr, vid)]; |
489 | struct net_bridge_fdb_entry *fdb; | 489 | struct net_bridge_fdb_entry *fdb; |
490 | bool fdb_modified = false; | ||
490 | 491 | ||
491 | /* some users want to always flood. */ | 492 | /* some users want to always flood. */ |
492 | if (hold_time(br) == 0) | 493 | if (hold_time(br) == 0) |
@@ -507,10 +508,15 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source, | |||
507 | source->dev->name); | 508 | source->dev->name); |
508 | } else { | 509 | } else { |
509 | /* fastpath: update of existing entry */ | 510 | /* fastpath: update of existing entry */ |
510 | fdb->dst = source; | 511 | if (unlikely(source != fdb->dst)) { |
512 | fdb->dst = source; | ||
513 | fdb_modified = true; | ||
514 | } | ||
511 | fdb->updated = jiffies; | 515 | fdb->updated = jiffies; |
512 | if (unlikely(added_by_user)) | 516 | if (unlikely(added_by_user)) |
513 | fdb->added_by_user = 1; | 517 | fdb->added_by_user = 1; |
518 | if (unlikely(fdb_modified)) | ||
519 | fdb_notify(br, fdb, RTM_NEWNEIGH); | ||
514 | } | 520 | } |
515 | } else { | 521 | } else { |
516 | spin_lock(&br->hash_lock); | 522 | spin_lock(&br->hash_lock); |