net: bridge: notify on hw fdb takeover
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Fri, 14 Apr 2017 10:49:34 +0000 (13:49 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Apr 2017 17:45:34 +0000 (13:45 -0400)
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>
net/bridge/br_fdb.c

index 5a40a87..de7988b 100644 (file)
@@ -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);
                }