Commit 47420640 authored by Patrick McHardy's avatar Patrick McHardy Committed by Stephen Hemminger

iflink_vlan: support GVRP flag

This is the patch for iproute for configuring GVRP.

commit 32143eed8b706e5c6554ab42903533b3bccdc060
Author: Patrick McHardy <kaber@trash.net>
Date:   Thu Jul 3 19:05:09 2008 +0200

    [IPROUTE]: iflink_vlan: support GVRP flag
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarStephen Hemminger <stephen.hemminger@vyatta.com>
parent 87953940
......@@ -26,7 +26,7 @@ static void explain(void)
"\n"
"VLANID := 0-4095\n"
"FLAG-LIST := [ FLAG-LIST ] FLAG\n"
"FLAG := [ reorder_hdr { on | off } ]\n"
"FLAG := [ reorder_hdr { on | off } ] [ gvrp { on | off } ]\n"
"QOS-MAP := [ QOS-MAP ] QOS-MAPPING\n"
"QOS-MAPPING := FROM:TO\n"
);
......@@ -93,6 +93,15 @@ static int vlan_parse_opt(struct link_util *lu, int argc, char **argv,
flags.flags &= ~VLAN_FLAG_REORDER_HDR;
else
return on_off("reorder_hdr");
} else if (matches(*argv, "gvrp") == 0) {
NEXT_ARG();
flags.mask |= VLAN_FLAG_GVRP;
if (strcmp(*argv, "on") == 0)
flags.flags |= VLAN_FLAG_GVRP;
else if (strcmp(*argv, "off") == 0)
flags.flags &= ~VLAN_FLAG_GVRP;
else
return on_off("gvrp");
} else if (matches(*argv, "ingress-qos-map") == 0) {
NEXT_ARG();
if (vlan_parse_qos_map(&argc, &argv, n,
......@@ -146,6 +155,7 @@ static void vlan_print_flags(FILE *fp, __u32 flags)
fprintf(fp, #f "%s", flags ? "," : ""); \
}
_PF(REORDER_HDR);
_PF(GVRP);
#undef _PF
if (flags)
fprintf(fp, "%x", flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment