From: Patrick McHardy Date: Tue, 1 Dec 2009 01:21:39 +0000 (+0000) Subject: iplink_vlan: add support for VLAN loose binding flag X-Git-Tag: v2.6.33~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2180b6b50bdc50e1a7740e5283930088da0bbae7;p=thirdparty%2Fiproute2.git iplink_vlan: add support for VLAN loose binding flag This patch adds support for the VLAN loose binding flag that is supported in net-next to iplink_vlan. commit 870970deb6cbea7a5d4881bdd717304d5284d315 Author: Patrick McHardy Date: Tue Dec 1 12:21:15 2009 +0100 iplink_vlan: add support for VLAN loose binding flag Signed-off-by: Patrick McHardy --- diff --git a/ip/iplink_vlan.c b/ip/iplink_vlan.c index 97244826a..223feb316 100644 --- a/ip/iplink_vlan.c +++ b/ip/iplink_vlan.c @@ -27,6 +27,7 @@ static void explain(void) "VLANID := 0-4095\n" "FLAG-LIST := [ FLAG-LIST ] FLAG\n" "FLAG := [ reorder_hdr { on | off } ] [ gvrp { on | off } ]\n" + " [ loose_binding { on | off } ]\n" "QOS-MAP := [ QOS-MAP ] QOS-MAPPING\n" "QOS-MAPPING := FROM:TO\n" ); @@ -102,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"); + } else if (matches(*argv, "loose_binding") == 0) { + NEXT_ARG(); + flags.mask |= VLAN_FLAG_LOOSE_BINDING; + if (strcmp(*argv, "on") == 0) + flags.flags |= VLAN_FLAG_LOOSE_BINDING; + else if (strcmp(*argv, "off") == 0) + flags.flags &= ~VLAN_FLAG_LOOSE_BINDING; + else + return on_off("loose_binding"); } else if (matches(*argv, "ingress-qos-map") == 0) { NEXT_ARG(); if (vlan_parse_qos_map(&argc, &argv, n, @@ -156,6 +166,7 @@ static void vlan_print_flags(FILE *fp, __u32 flags) } _PF(REORDER_HDR); _PF(GVRP); + _PF(LOOSE_BINDING); #undef _PF if (flags) fprintf(fp, "%x", flags);