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