From 6b4c7dd7218ee83d4b2fa1fdd210a1393df7be7a Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 3 Aug 2020 16:54:59 +0100 Subject: [PATCH] Linux: fix reading the ipv6 forwarding proc entry We need to ensure that the carriage return doesn't give issue. --- src/if-linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/if-linux.c b/src/if-linux.c index 6493cd03..8d87d748 100644 --- a/src/if-linux.c +++ b/src/if-linux.c @@ -2090,7 +2090,7 @@ ip6_forwarding(const char *ifname) if (readfile(path, buf, sizeof(buf)) == -1) return 0; i = (int)strtoi(buf, NULL, 0, INT_MIN, INT_MAX, &error); - if (error != 0) + if (error != 0 && error != ENOTSUP) return 0; return i; } -- 2.47.3