bridge: netlink: add fdb flush
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Sun, 4 Oct 2015 12:23:36 +0000 (14:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 4 Oct 2015 23:46:01 +0000 (16:46 -0700)
Simple attribute that flushes the bridge's fdb.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/if_link.h
net/bridge/br_netlink.c

index eaeaac17dfdd1b1ff3b2532e1371bdb7dfbf58d2..9ca9bf8bfe04b71f7f8e600fe5307ce65ff52ba5 100644 (file)
@@ -244,6 +244,7 @@ enum {
        IFLA_BR_TOPOLOGY_CHANGE_TIMER,
        IFLA_BR_GC_TIMER,
        IFLA_BR_GROUP_ADDR,
+       IFLA_BR_FDB_FLUSH,
        __IFLA_BR_MAX,
 };
 
index a05a4306d42d9901128c7a369a9f1b53822de8b6..5853c57370060e007b4e55de16bddc886ca0e355 100644 (file)
@@ -859,6 +859,9 @@ static int br_changelink(struct net_device *brdev, struct nlattr *tb[],
                br_recalculate_fwd_mask(br);
        }
 
+       if (data[IFLA_BR_FDB_FLUSH])
+               br_fdb_flush(br);
+
        return 0;
 }