From: Roy Marples Date: Tue, 11 Mar 2014 09:39:23 +0000 (+0000) Subject: Validate an accepted reconfigure key if we don't require authentication. X-Git-Tag: v6.3.2~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5f224ee2aa82260a8fbcc1d75daf035451ffeb06;p=thirdparty%2Fdhcpcd.git Validate an accepted reconfigure key if we don't require authentication. --- diff --git a/auth.c b/auth.c index e877be66..9aeff931 100644 --- a/auth.c +++ b/auth.c @@ -139,8 +139,14 @@ dhcp_auth_validate(struct authstate *state, const struct auth *auth, algorithm != auth->algorithm || rdm != auth->rdm) { - errno = EPERM; - return NULL; + /* As we don't require authentication, we should still + * accept a reconfigure key */ + if (protocol != AUTH_PROTO_RECONFKEY || + auth->options & DHCPCD_AUTH_REQUIRE) + { + errno = EPERM; + return NULL; + } } dlen -= 3;