aboutsummaryrefslogtreecommitdiffstats
path: root/ip/iplink_vlan.c
diff options
context:
space:
mode:
authorDavid Ward <david.ward@ll.mit.edu>2013-02-27 13:00:40 +0000
committerStephen Hemminger <stephen@networkplumber.org>2013-03-06 10:46:37 -0800
commit4e9a686020b2ff4e391f685a53c91365d04a5e43 (patch)
treebc4c5b8eb2d38330e45f1db67d121ae999c55270 /ip/iplink_vlan.c
parentdaa45caddb9d247dfd2f0755635a221873d55975 (diff)
downloadplatform_external_iproute2-4e9a686020b2ff4e391f685a53c91365d04a5e43.tar.gz
platform_external_iproute2-4e9a686020b2ff4e391f685a53c91365d04a5e43.tar.bz2
platform_external_iproute2-4e9a686020b2ff4e391f685a53c91365d04a5e43.zip
iplink_vlan: Add flag for Multiple VLAN Registration Protocol (MVRP)
Signed-off-by: David Ward <david.ward@ll.mit.edu> Acked-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'ip/iplink_vlan.c')
-rw-r--r--ip/iplink_vlan.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/ip/iplink_vlan.c b/ip/iplink_vlan.c
index 26ceb8d9..ed8984a7 100644
--- a/ip/iplink_vlan.c
+++ b/ip/iplink_vlan.c
@@ -26,7 +26,7 @@ static void explain(void)
"\n"
"VLANID := 0-4095\n"
"FLAG-LIST := [ FLAG-LIST ] FLAG\n"
- "FLAG := [ reorder_hdr { on | off } ] [ gvrp { on | off } ]\n"
+ "FLAG := [ reorder_hdr { on | off } ] [ gvrp { on | off } ] [ mvrp { on | off } ]\n"
" [ loose_binding { on | off } ]\n"
"QOS-MAP := [ QOS-MAP ] QOS-MAPPING\n"
"QOS-MAPPING := FROM:TO\n"
@@ -103,6 +103,15 @@ static int vlan_parse_opt(struct link_util *lu, int argc, char **argv,
flags.flags &= ~VLAN_FLAG_GVRP;
else
return on_off("gvrp", *argv);
+ } else if (matches(*argv, "mvrp") == 0) {
+ NEXT_ARG();
+ flags.mask |= VLAN_FLAG_MVRP;
+ if (strcmp(*argv, "on") == 0)
+ flags.flags |= VLAN_FLAG_MVRP;
+ else if (strcmp(*argv, "off") == 0)
+ flags.flags &= ~VLAN_FLAG_MVRP;
+ else
+ return on_off("mvrp", *argv);
} else if (matches(*argv, "loose_binding") == 0) {
NEXT_ARG();
flags.mask |= VLAN_FLAG_LOOSE_BINDING;
@@ -166,6 +175,7 @@ static void vlan_print_flags(FILE *fp, __u32 flags)
}
_PF(REORDER_HDR);
_PF(GVRP);
+ _PF(MVRP);
_PF(LOOSE_BINDING);
#undef _PF
if (flags)