lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 28 Nov 2017 11:16:21 +0000
From:   robertshearman@...il.com
To:     stephen@...workplumber.org, netdev@...r.kernel.org
Cc:     Robert Shearman <rs823p@....com>
Subject: [PATCH iproute2] gre: Fix ttl inherit option

From: Robert Shearman <rs823p@....com>

Specifying "... ttl inherit" currently does nothing on a GRE link
modify since the previous ttl value is retrieved up front. Fix this by
explicitly setting ttl to 0 when "inherit" is specified for the
option, since 0 represents the semantics of inherit.

Signed-off-by: Robert Shearman <rs823p@....com>
---
 ip/link_gre.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ip/link_gre.c b/ip/link_gre.c
index 35782caaa68b..43cb1af6196a 100644
--- a/ip/link_gre.c
+++ b/ip/link_gre.c
@@ -276,7 +276,8 @@ get_failed:
 				if (uval > 255)
 					invarg("TTL must be <= 255\n", *argv);
 				ttl = uval;
-			}
+			} else
+				ttl = 0;
 		} else if (!matches(*argv, "tos") ||
 			   !matches(*argv, "tclass") ||
 			   !matches(*argv, "dsfield")) {
-- 
2.1.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ