Blame SOURCES/0011-link_gre6-really-support-encaplimit-option.patch

be97f7
From 2db276543a03633a61ba0815a01c8bb2846830ab Mon Sep 17 00:00:00 2001
be97f7
From: Phil Sutter <psutter@redhat.com>
be97f7
Date: Thu, 14 Sep 2017 15:30:37 +0200
be97f7
Subject: [PATCH] link_gre6: really support encaplimit option
be97f7
be97f7
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1459600
be97f7
Upstream Status: iproute2.git commit a11b7b71a6eba
be97f7
Conflicts: Context change due to missing commit ad4b1425c3182
be97f7
	   ("iplink: Expose IFLA_*_FWMARK attributes for supported link
be97f7
	   types").
be97f7
be97f7
commit a11b7b71a6eba4ee80e931e4f75321a0cf0116f1
be97f7
Author: Nicolas Dichtel <nicolas.dichtel@6wind.com>
be97f7
Date:   Wed Jun 14 18:45:42 2017 +0200
be97f7
be97f7
    link_gre6: really support encaplimit option
be97f7
be97f7
    This option is documented in gre6 help, but was not supported.
be97f7
be97f7
    Fixes: af89576d7a8c ("iproute2: GRE over IPv6 tunnel support.")
be97f7
    Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
be97f7
---
be97f7
 ip/link_gre6.c | 12 ++++++++++++
be97f7
 1 file changed, 12 insertions(+)
be97f7
be97f7
diff --git a/ip/link_gre6.c b/ip/link_gre6.c
be97f7
index 1b4fb05..76416b2 100644
be97f7
--- a/ip/link_gre6.c
be97f7
+++ b/ip/link_gre6.c
be97f7
@@ -339,6 +339,18 @@ get_failed:
be97f7
 			encapflags |= TUNNEL_ENCAP_FLAG_REMCSUM;
be97f7
 		} else if (strcmp(*argv, "noencap-remcsum") == 0) {
be97f7
 			encapflags &= ~TUNNEL_ENCAP_FLAG_REMCSUM;
be97f7
+		} else if (strcmp(*argv, "encaplimit") == 0) {
be97f7
+			NEXT_ARG();
be97f7
+			if (strcmp(*argv, "none") == 0) {
be97f7
+				flags |= IP6_TNL_F_IGN_ENCAP_LIMIT;
be97f7
+			} else {
be97f7
+				__u8 uval;
be97f7
+
be97f7
+				if (get_u8(&uval, *argv, 0) < -1)
be97f7
+					invarg("invalid ELIM", *argv);
be97f7
+				encap_limit = uval;
be97f7
+				flags &= ~IP6_TNL_F_IGN_ENCAP_LIMIT;
be97f7
+			}
be97f7
 		} else
be97f7
 			usage();
be97f7
 		argc--; argv++;
be97f7
-- 
be97f7
1.8.3.1
be97f7