From: Roy Marples Date: Thu, 18 May 2023 11:27:10 +0000 (+0100) Subject: Linux: fix disabling of kernel RA autoconf X-Git-Tag: v10.0.2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dccebe204fd522c1e78513ba0b05d291ae88ed8d;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 3ca96705..f2f609ed 100644 --- a/src/if-linux.c +++ b/src/if-linux.c @@ -2139,7 +2139,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); }