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