summaryrefslogtreecommitdiff
path: root/net/bridge
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>2017-04-14 13:49:34 +0300
committerDavid S. Miller <davem@davemloft.net>2017-04-17 20:45:34 +0300
commitcab93af0ed6a12b63ebf0ebca37e6d8efd399114 (patch)
treef06321abb51d03e36218c6a73202133c45404f7d /net/bridge
parentf5001ceab8996d76880004381c188b3b96c8c7af (diff)
downloadlinux-cab93af0ed6a12b63ebf0ebca37e6d8efd399114.tar.xz
net: bridge: notify on hw fdb takeover
Recently we added support for SW fdbs to take over HW ones, but that results in changing a user-visible fdb flag thus we need to send a notification, also it's consistent with how HW takes over SW entries. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_fdb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
index 5a40a87c4f4f..de7988b0349e 100644
--- a/net/bridge/br_fdb.c
+++ b/net/bridge/br_fdb.c
@@ -595,8 +595,10 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
if (unlikely(added_by_user))
fdb->added_by_user = 1;
/* Take over HW learned entry */
- if (unlikely(fdb->added_by_external_learn))
+ if (unlikely(fdb->added_by_external_learn)) {
fdb->added_by_external_learn = 0;
+ fdb_modified = true;
+ }
if (unlikely(fdb_modified))
fdb_notify(br, fdb, RTM_NEWNEIGH);
}