]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
link_gre6: really support encaplimit option
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Wed, 14 Jun 2017 16:45:42 +0000 (18:45 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Thu, 15 Jun 2017 15:29:30 +0000 (08:29 -0700)
This option is documented in gre6 help, but was not supported.

Fixes: af89576d7a8c ("iproute2: GRE over IPv6 tunnel support.")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
ip/link_gre6.c

index 205bada78054edf6b0eb042913e124903fb51378..4d3d4b54210b964d291d2aaca0723726bc1cbb00 100644 (file)
@@ -355,6 +355,18 @@ get_failed:
                                        invarg("invalid fwmark\n", *argv);
                                flags &= ~IP6_TNL_F_USE_ORIG_FWMARK;
                        }
+               } else if (strcmp(*argv, "encaplimit") == 0) {
+                       NEXT_ARG();
+                       if (strcmp(*argv, "none") == 0) {
+                               flags |= IP6_TNL_F_IGN_ENCAP_LIMIT;
+                       } else {
+                               __u8 uval;
+
+                               if (get_u8(&uval, *argv, 0) < -1)
+                                       invarg("invalid ELIM", *argv);
+                               encap_limit = uval;
+                               flags &= ~IP6_TNL_F_IGN_ENCAP_LIMIT;
+                       }
                } else
                        usage();
                argc--; argv++;