From: Roy Marples Date: Sat, 20 Apr 2019 20:07:16 +0000 (+0100) Subject: auth: Improve comment about DHCPv4 option splitting not working X-Git-Tag: v7.2.1~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebbf6d526f3e009b5dd3f6ed1edc24417d101636;p=thirdparty%2Fdhcpcd.git auth: Improve comment about DHCPv4 option splitting not working Patches to fix this welcome :) --- diff --git a/src/auth.c b/src/auth.c index ce97051e..cd774150 100644 --- a/src/auth.c +++ b/src/auth.c @@ -117,7 +117,11 @@ dhcp_auth_validate(struct authstate *state, const struct auth *auth, m = vm; data = vdata; - /* Ensure that d is inside m which *may* not be the case for DHPCPv4 */ + /* Ensure that d is inside m which *may* not be the case for DHCPv4. + * This can occur if the authentication option is split using + * DHCP long option from RFC 3399. Section 9 which does infact note that + * implementations should take this into account. + * Fixing this would be problematic, patches welcome. */ if (data < m || data > m + mlen || data + dlen > m + mlen) { errno = ERANGE; return NULL;