From: Roy Marples Date: Mon, 3 Aug 2020 15:54:59 +0000 (+0100) Subject: Linux: fix reading the ipv6 forwarding proc entry X-Git-Tag: v9.2.0~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b4c7dd7218ee83d4b2fa1fdd210a1393df7be7a;p=thirdparty%2Fdhcpcd.git Linux: fix reading the ipv6 forwarding proc entry We need to ensure that the carriage return doesn't give issue. --- 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; }