if (prtb[IFLA_BRPORT_FAST_LEAVE])
print_onoff(fp, "fastleave",
rta_getattr_u8(prtb[IFLA_BRPORT_FAST_LEAVE]));
+ if (prtb[IFLA_BRPORT_LEARNING])
+ print_onoff(fp, "learning",
+ rta_getattr_u8(prtb[IFLA_BRPORT_LEARNING]));
+ if (prtb[IFLA_BRPORT_UNICAST_FLOOD])
+ print_onoff(fp, "flood",
+ rta_getattr_u8(prtb[IFLA_BRPORT_UNICAST_FLOOD]));
}
} else
print_portstate(fp, rta_getattr_u8(tb[IFLA_PROTINFO]));
fprintf(stderr, " [ hairpin {on | off} ] \n");
fprintf(stderr, " [ fastleave {on | off} ]\n");
fprintf(stderr, " [ root_block {on | off} ]\n");
+ fprintf(stderr, " [ learning {on | off} ]\n");
+ fprintf(stderr, " [ flood {on | off} ]\n");
fprintf(stderr, " [ hwmode {vepa | veb} ]\n");
fprintf(stderr, " bridge link show [dev DEV]\n");
exit(-1);
char buf[512];
} req;
char *d = NULL;
+ __s8 learning = -1;
+ __s8 flood = -1;
__s8 hairpin = -1;
__s8 bpdu_guard = -1;
__s8 fast_leave = -1;
NEXT_ARG();
if (!on_off("root_block", &root_block, *argv))
exit(-1);
+ } else if (strcmp(*argv, "learning") == 0) {
+ NEXT_ARG();
+ if (!on_off("learning", &learning, *argv))
+ exit(-1);
+ } else if (strcmp(*argv, "flood") == 0) {
+ NEXT_ARG();
+ if (!on_off("flood", &flood, *argv))
+ exit(-1);
} else if (strcmp(*argv, "cost") == 0) {
NEXT_ARG();
cost = atoi(*argv);
fast_leave);
if (root_block >= 0)
addattr8(&req.n, sizeof(req), IFLA_BRPORT_PROTECT, root_block);
+ if (flood >= 0)
+ addattr8(&req.n, sizeof(req), IFLA_BRPORT_UNICAST_FLOOD, flood);
+ if (learning >= 0)
+ addattr8(&req.n, sizeof(req), IFLA_BRPORT_LEARNING, learning);
if (cost > 0)
addattr32(&req.n, sizeof(req), IFLA_BRPORT_COST, cost);
.BR hairpin " { " on " | " off " } ] [ "
.BR fastleave " { " on " | " off " } ] [ "
.BR root_block " { " on " | " off " } ] [ "
+.BR learning " { " on " | " off " } ] [ "
+.BR flood " { " on " | " off " } ] [ "
.BR hwmode " { " vepa " | " veb " } ] "
.ti -8
Controls whether a given port is allowed to become root port or not. Only used
when STP is enabled on the bridge. By default the flag is off.
+.TP
+.BR "learning on " or " learning off "
+Controls whether a given port will learn MAC addresses from received traffic or
+not. If learning if off, the bridge will end up flooding any traffic for which
+it has no FDB entry. By default this flag is on.
+
+.TP
+.BR "flooding on " or " flooding off "
+Controls whether a given port will flood unicast traffic for which there is no FDB entry. By default this flag is on.
+
.TP
.BI hwmode
Some network interface cards support HW bridge functionality and they may be