[CRIU] [PATCH] zdtm/netns-dev: restrict hop_limit sysctl setting to range [1; 255]

Andrey Vagin avagin at openvz.org
Tue May 24 13:30:12 PDT 2016


From: Andrew Vagin <avagin at virtuozzo.com>

$ git log v4.4-rc1-465-gd6df198
commit d6df198d924775e4751561cf60ef0294e95f74df
Author: Phil Sutter <phil at nwl.cc>
Date:   Tue Dec 1 22:45:15 2015 +0100

    net: ipv6: restrict hop_limit sysctl setting to range [1; 255]

    Setting a value bigger than 255 resulted in using only the lower eight
    bits of that value as it is assigned to the u8 header field. To avoid
    this unexpected result, reject such values.

https://github.com/xemul/criu/issues/164
Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
 test/zdtm/static/netns-dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/zdtm/static/netns-dev.c b/test/zdtm/static/netns-dev.c
index 37b7b04..30b7f6a 100644
--- a/test/zdtm/static/netns-dev.c
+++ b/test/zdtm/static/netns-dev.c
@@ -156,7 +156,7 @@ struct range rand_range6[] = {
 	{0, 2},	/* force_mld_version */
 	{0, 1},	/* force_tllao */
 	{0, 1},	/* forwarding */
-	{0, INT_MAX},	/* hop_limit */
+	{0, 255},	/* hop_limit */
 	{0, 1},	/* ignore_routes_with_linkdown */
 	{-1, 1},	/* keep_addr_on_down */
 	{0, MAX_ADDRESSES},	/* max_addresses */
-- 
2.7.4



More information about the CRIU mailing list