" [ state STATE ] [ dynamic ] ]\n"
" bridge fdb get [ to ] LLADDR [ br BRDEV ] { brport | dev } DEV\n"
" [ vlan VID ] [ vni VNI ] [ self ] [ master ] [ dynamic ]\n"
- " bridge fdb flush dev DEV [ self ] [ master ]\n");
+ " bridge fdb flush dev DEV [ vlan VID ] [ self ] [ master ]\n");
exit(-1);
}
};
unsigned short ndm_flags = 0;
char *d = NULL;
+ short vid = -1;
while (argc > 0) {
if (strcmp(*argv, "dev") == 0) {
ndm_flags |= NTF_MASTER;
} else if (strcmp(*argv, "self") == 0) {
ndm_flags |= NTF_SELF;
+ } else if (strcmp(*argv, "vlan") == 0) {
+ if (vid >= 0)
+ duparg2("vlan", *argv);
+ NEXT_ARG();
+ vid = atoi(*argv);
} else {
if (strcmp(*argv, "help") == 0)
NEXT_ARG();
return -1;
}
+ if (vid >= 4096) {
+ fprintf(stderr, "Invalid VLAN ID \"%hu\"\n", vid);
+ return -1;
+ }
+
/* if self and master were not specified assume self */
if (!(ndm_flags & (NTF_SELF | NTF_MASTER)))
ndm_flags |= NTF_SELF;
req.ndm.ndm_flags = ndm_flags;
+ if (vid > -1)
+ addattr16(&req.n, sizeof(req), NDA_VLAN, vid);
if (rtnl_talk(&rth, &req.n, NULL) < 0)
return -1;
.BR "bridge fdb flush"
.B dev
.IR DEV " [ "
+.B vlan
+.IR VID " ] [ "
.BR self " ] [ " master " ]"
.ti -8
is set then the operation will be fulfilled by its master device's driver and
all entries pointing to that port will be deleted.
+.TP
+.BI vlan " VID"
+the target VLAN ID for the operation. Match forwarding table entries only with the
+specified VLAN ID.
+
.TP
.B self
the operation is fulfilled directly by the driver for the specified network