iplink: bridge: add support for IFLA_BR_FDB_FLUSH

This patch implements support for the IFLA_BR_FDB_FLUSH attribute
in iproute2 so it can flush bridge fdb dynamic entries.

Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
This commit is contained in:
Hangbin Liu 2017-01-18 14:12:47 +08:00 committed by Stephen Hemminger
parent e763e3310e
commit f3372d62eb

View File

@ -22,7 +22,8 @@
static void print_explain(FILE *f)
{
fprintf(f,
"Usage: ... bridge [ forward_delay FORWARD_DELAY ]\n"
"Usage: ... bridge [ fdb_flush ]\n"
" [ forward_delay FORWARD_DELAY ]\n"
" [ hello_time HELLO_TIME ]\n"
" [ max_age MAX_AGE ]\n"
" [ ageing_time AGEING_TIME ]\n"
@ -145,6 +146,8 @@ static int bridge_parse_opt(struct link_util *lu, int argc, char **argv,
if (len < 0)
return -1;
addattr_l(n, 1024, IFLA_BR_GROUP_ADDR, llabuf, len);
} else if (matches(*argv, "fdb_flush") == 0) {
addattr(n, 1024, IFLA_BR_FDB_FLUSH);
} else if (matches(*argv, "vlan_default_pvid") == 0) {
__u16 default_pvid;