From: Roy Marples Date: Thu, 18 May 2023 11:27:10 +0000 (+0100) Subject: Linux: fix disabling of kernel RA autoconf X-Git-Tag: v9.5.2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=953bf1e8f826c00960b2618ed25f02dfcede2518;p=thirdparty%2Fdhcpcd.git Linux: fix disabling of kernel RA autoconf Well, that was a big whups leaving it turned on. Thanks to Klaus Frank for the spot. Fixes #176. --- diff --git a/src/if-linux.c b/src/if-linux.c index 5600f0cc..ecb82b7b 100644 --- a/src/if-linux.c +++ b/src/if-linux.c @@ -2107,7 +2107,12 @@ if_setup_inet6(const struct interface *ifp) snprintf(path, sizeof(path), "%s/%s/autoconf", p_conf, ifp->name); ra = check_proc_int(ctx, path); - if (ra != 1 && ra != -1) { + if (ra == -1) { + /* The sysctl probably doesn't exist, but this isn't an + * error as such so just log it and continue */ + if (errno != ENOENT) + logerr("%s: %s", __func__, path); + } else if (ra != 0) { if (if_writepathuint(ctx, path, 0) == -1) logerr("%s: %s", __func__, path); }