mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-11-03 03:23:58 +00:00
iplink: bridge_slave: add support for IFLA_BRPORT_FLUSH
This patch implements support for the IFLA_BRPORT_FLUSH attribute in iproute2 so it can flush bridge slave's fdb dynamic entries. Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
This commit is contained in:
parent
c3f1e3c425
commit
d1b41236e1
@ -22,7 +22,10 @@
|
||||
static void print_explain(FILE *f)
|
||||
{
|
||||
fprintf(f,
|
||||
"Usage: ... bridge_slave [ state STATE ] [ priority PRIO ] [cost COST ]\n"
|
||||
"Usage: ... bridge_slave [ fdb_flush ]\n"
|
||||
" [ state STATE ]\n"
|
||||
" [ priority PRIO ]\n"
|
||||
" [ cost COST ]\n"
|
||||
" [ guard {on | off} ]\n"
|
||||
" [ hairpin {on | off} ]\n"
|
||||
" [ fastleave {on | off} ]\n"
|
||||
@ -217,7 +220,9 @@ static int bridge_slave_parse_opt(struct link_util *lu, int argc, char **argv,
|
||||
__u32 cost;
|
||||
|
||||
while (argc > 0) {
|
||||
if (matches(*argv, "state") == 0) {
|
||||
if (matches(*argv, "fdb_flush") == 0) {
|
||||
addattr(n, 1024, IFLA_BRPORT_FLUSH);
|
||||
} else if (matches(*argv, "state") == 0) {
|
||||
NEXT_ARG();
|
||||
if (get_u8(&state, *argv, 0))
|
||||
invarg("state is invalid", *argv);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user