]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
auth: Improve comment about DHCPv4 option splitting not working
authorRoy Marples <roy@marples.name>
Sat, 20 Apr 2019 20:07:16 +0000 (21:07 +0100)
committerRoy Marples <roy@marples.name>
Sat, 20 Apr 2019 20:07:16 +0000 (21:07 +0100)
Patches to fix this welcome :)

src/auth.c

index ce97051ea37ff5921dd5f58328e173798d5144e5..cd774150309bf24237529260effacf280579c234 100644 (file)
@@ -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;