This config maps to IFLA_BRPORT_VLAN_TUNNEL bridge port netlink
flag attribute. This flag enables vlan to tunnel mapping on a bridge
port. It is off by default.
set vlan_tunnel attribute on bridge port vxlan0:
$ip link set dev vxlan0 type bridge_slave vlan_tunnel on
$ip link set dev vxlan0 type bridge_slave vlan_tunnel off
or via bridge command
$bridge link set dev vxlan0 vlan_tunnel on
$bridge link set dev vxlan0 vlan_tunnel off
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
if (prtb[IFLA_BRPORT_NEIGH_SUPPRESS])
print_onoff(fp, "neigh_suppress",
rta_getattr_u8(prtb[IFLA_BRPORT_NEIGH_SUPPRESS]));
if (prtb[IFLA_BRPORT_NEIGH_SUPPRESS])
print_onoff(fp, "neigh_suppress",
rta_getattr_u8(prtb[IFLA_BRPORT_NEIGH_SUPPRESS]));
+ if (prtb[IFLA_BRPORT_VLAN_TUNNEL])
+ print_onoff(fp, "vlan_tunnel",
+ rta_getattr_u8(prtb[IFLA_BRPORT_VLAN_TUNNEL]));
}
} else
print_portstate(fp, rta_getattr_u8(tb[IFLA_PROTINFO]));
}
} else
print_portstate(fp, rta_getattr_u8(tb[IFLA_PROTINFO]));
fprintf(stderr, " [ learning_sync {on | off} ]\n");
fprintf(stderr, " [ flood {on | off} ]\n");
fprintf(stderr, " [ mcast_flood {on | off} ]\n");
fprintf(stderr, " [ learning_sync {on | off} ]\n");
fprintf(stderr, " [ flood {on | off} ]\n");
fprintf(stderr, " [ mcast_flood {on | off} ]\n");
+ fprintf(stderr, " [ neigh_suppress {on | off} ]\n");
+ fprintf(stderr, " [ vlan_tunnel {on | off} ]\n");
fprintf(stderr, " [ hwmode {vepa | veb} ]\n");
fprintf(stderr, " [ self ] [ master ]\n");
fprintf(stderr, " bridge link show [dev DEV]\n");
fprintf(stderr, " [ hwmode {vepa | veb} ]\n");
fprintf(stderr, " [ self ] [ master ]\n");
fprintf(stderr, " bridge link show [dev DEV]\n");
__s8 learning = -1;
__s8 learning_sync = -1;
__s8 flood = -1;
__s8 learning = -1;
__s8 learning_sync = -1;
__s8 flood = -1;
__s8 mcast_flood = -1;
__s8 hairpin = -1;
__s8 bpdu_guard = -1;
__s8 mcast_flood = -1;
__s8 hairpin = -1;
__s8 bpdu_guard = -1;
if (!on_off("neigh_suppress", &neigh_suppress,
*argv))
return -1;
if (!on_off("neigh_suppress", &neigh_suppress,
*argv))
return -1;
+ } else if (strcmp(*argv, "vlan_tunnel") == 0) {
+ NEXT_ARG();
+ if (!on_off("vlan_tunnel", &vlan_tunnel,
+ *argv))
+ return -1;
if (neigh_suppress != -1)
addattr8(&req.n, sizeof(req), IFLA_BRPORT_NEIGH_SUPPRESS,
neigh_suppress);
if (neigh_suppress != -1)
addattr8(&req.n, sizeof(req), IFLA_BRPORT_NEIGH_SUPPRESS,
neigh_suppress);
+ if (vlan_tunnel != -1)
+ addattr8(&req.n, sizeof(req), IFLA_BRPORT_VLAN_TUNNEL,
+ vlan_tunnel);
addattr_nest_end(&req.n, nest);
addattr_nest_end(&req.n, nest);
" [ mcast_flood {on | off} ]\n"
" [ group_fwd_mask MASK ]\n"
" [ neigh_suppress {on | off} ]\n"
" [ mcast_flood {on | off} ]\n"
" [ group_fwd_mask MASK ]\n"
" [ neigh_suppress {on | off} ]\n"
+ " [ vlan_tunnel {on | off} ]\n"
print_string(PRINT_ANY, "group_fwd_mask_str",
"group_fwd_mask_str %s ", convbuf);
}
print_string(PRINT_ANY, "group_fwd_mask_str",
"group_fwd_mask_str %s ", convbuf);
}
+
+ if (tb[IFLA_BRPORT_VLAN_TUNNEL])
+ _print_onoff(f, "vlan_tunnel", "vlan_tunnel",
+ rta_getattr_u8(tb[IFLA_BRPORT_VLAN_TUNNEL]));
}
static void bridge_slave_parse_on_off(char *arg_name, char *arg_val,
}
static void bridge_slave_parse_on_off(char *arg_name, char *arg_val,
if (get_u16(&mask, *argv, 0))
invarg("invalid group_fwd_mask", *argv);
addattr16(n, 1024, IFLA_BRPORT_GROUP_FWD_MASK, mask);
if (get_u16(&mask, *argv, 0))
invarg("invalid group_fwd_mask", *argv);
addattr16(n, 1024, IFLA_BRPORT_GROUP_FWD_MASK, mask);
+ } else if (matches(*argv, "vlan_tunnel") == 0) {
+ NEXT_ARG();
+ bridge_slave_parse_on_off("vlan_tunnel", *argv, n,
+ IFLA_BRPORT_VLAN_TUNNEL);
} else if (matches(*argv, "help") == 0) {
explain();
return -1;
} else if (matches(*argv, "help") == 0) {
explain();
return -1;
.BR flood " { " on " | " off " } ] [ "
.BR hwmode " { " vepa " | " veb " } ] [ "
.BR mcast_flood " { " on " | " off " } ] [ "
.BR flood " { " on " | " off " } ] [ "
.BR hwmode " { " vepa " | " veb " } ] [ "
.BR mcast_flood " { " on " | " off " } ] [ "
+.BR neigh_suppress " { " on " | " off " } ] [ "
+.BR vlan_tunnel " { " on " | " off " } ] [ "
.BR self " ] [ " master " ]"
.ti -8
.BR self " ] [ " master " ]"
.ti -8
.BR "neigh_suppress on " or " neigh_suppress off "
Controls whether neigh discovery (arp and nd) proxy and suppression is enabled on the port. By default this flag is off.
.BR "neigh_suppress on " or " neigh_suppress off "
Controls whether neigh discovery (arp and nd) proxy and suppression is enabled on the port. By default this flag is off.
+.TP
+.BR "vlan_tunnel on " or " vlan_tunnel off "
+Controls whether vlan to tunnel mapping is enabled on the port. By default this flag is off.
+
.TP
.BI self
link setting is configured on specified physical device
.TP
.BI self
link setting is configured on specified physical device
.BR group_fwd_mask " MASK"
] [
.BR neigh_suppress " { " on " | " off " } ]"
.BR group_fwd_mask " MASK"
] [
.BR neigh_suppress " { " on " | " off " } ]"
+] [
+.BR vlan_tunnel " { " on " | " off " } ]"
.BR neigh_suppress " { " on " | " off " }"
- controls whether neigh discovery (arp and nd) proxy and suppression is enabled on the port. By default this flag is off.
.BR neigh_suppress " { " on " | " off " }"
- controls whether neigh discovery (arp and nd) proxy and suppression is enabled on the port. By default this flag is off.
+.BR vlan_tunnel " { " on " | " off " }"
+- Controls whether vlan to tunnel mapping is enabled on the port. By default this flag is off.
+