Blame SOURCES/0040-link_gre6-Detect-invalid-encaplimit-values.patch

be97f7
From 90a1430fca8d5165e1909de9f009aa9f4d6430ef Mon Sep 17 00:00:00 2001
be97f7
From: Phil Sutter <psutter@redhat.com>
be97f7
Date: Wed, 29 Nov 2017 18:36:17 +0100
be97f7
Subject: [PATCH] link_gre6: Detect invalid encaplimit values
be97f7
be97f7
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1459600
be97f7
Upstream Status: iproute2.git commit 56708ae7c9535
be97f7
be97f7
commit 56708ae7c9535859223c5b68097b35bf0fae677c
be97f7
Author: Phil Sutter <phil@nwl.cc>
be97f7
Date:   Tue Nov 28 16:49:58 2017 +0100
be97f7
be97f7
    link_gre6: Detect invalid encaplimit values
be97f7
be97f7
    Looks like a typo: get_u8() returns 0 on success and -1 on error, so the
be97f7
    error checking here was ineffective.
be97f7
be97f7
    Fixes: a11b7b71a6eba ("link_gre6: really support encaplimit option")
be97f7
    Signed-off-by: Phil Sutter <phil@nwl.cc>
be97f7
---
be97f7
 ip/link_gre6.c | 2 +-
be97f7
 1 file changed, 1 insertion(+), 1 deletion(-)
be97f7
be97f7
diff --git a/ip/link_gre6.c b/ip/link_gre6.c
be97f7
index 932f9ee..a9d18ee 100644
be97f7
--- a/ip/link_gre6.c
be97f7
+++ b/ip/link_gre6.c
be97f7
@@ -351,7 +351,7 @@ get_failed:
be97f7
 			} else {
be97f7
 				__u8 uval;
be97f7
 
be97f7
-				if (get_u8(&uval, *argv, 0) < -1)
be97f7
+				if (get_u8(&uval, *argv, 0))
be97f7
 					invarg("invalid ELIM", *argv);
be97f7
 				encap_limit = uval;
be97f7
 				flags &= ~IP6_TNL_F_IGN_ENCAP_LIMIT;
be97f7
-- 
be97f7
1.8.3.1
be97f7