diff options
author | Nikolay Aleksandrov <nikolay@cumulusnetworks.com> | 2015-10-06 14:12:01 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-07 04:49:32 -0700 |
commit | 9b0c6e4deb3df91bf0aea8158ea77dc58c9d90b6 (patch) | |
tree | 2fb9c31e971436462f94c2b0960d0c2392c7d6b6 /net | |
parent | 61c0a9a83e0b12c712cd686172446aba8ea48685 (diff) | |
download | op-kernel-dev-9b0c6e4deb3df91bf0aea8158ea77dc58c9d90b6.zip op-kernel-dev-9b0c6e4deb3df91bf0aea8158ea77dc58c9d90b6.tar.gz |
bridge: netlink: allow to flush port's fdb
Add IFLA_BRPORT_FLUSH to allow flushing port's fdb similar to sysfs's
flush.
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/bridge/br_netlink.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index 04b0e50..6468166 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c @@ -631,6 +631,9 @@ static int br_setport(struct net_bridge_port *p, struct nlattr *tb[]) return err; } + if (tb[IFLA_BRPORT_FLUSH]) + br_fdb_delete_by_port(p->br, p, 0, 0); + br_port_flags_change(p, old_flags ^ p->flags); return 0; } |