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