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 eaeaac1..9ca9bf8 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 a05a430..5853c57 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;
 }