]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Linux: fix reading the ipv6 forwarding proc entry
authorRoy Marples <roy@marples.name>
Mon, 3 Aug 2020 15:54:59 +0000 (16:54 +0100)
committerRoy Marples <roy@marples.name>
Mon, 3 Aug 2020 15:54:59 +0000 (16:54 +0100)
We need to ensure that the carriage return doesn't give issue.

src/if-linux.c

index 6493cd031fa6cffd625db69c605441291459a9db..8d87d7484f6b5596b4d6156e8481f37dd0595882 100644 (file)
@@ -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;
 }