]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Maximum-Msg-Size is uint16, not uint32
authorAlan T. DeKok <aland@freeradius.org>
Thu, 12 Feb 2026 16:42:04 +0000 (11:42 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 12 Feb 2026 18:37:10 +0000 (13:37 -0500)
src/protocols/dhcpv4/base.c

index 66c0b1a8c5d70c6d3f7e5d0796efe6cc08f76e58..a0afe0220f3af284fed53a45627379684a12457f 100644 (file)
@@ -376,8 +376,8 @@ ssize_t fr_dhcpv4_encode_dbuff(fr_dbuff_t *dbuff, dhcp_packet_t *original, int c
 
        /* Maximum-Msg-Size */
        vp = fr_pair_find_by_da(vps, NULL, attr_dhcp_dhcp_maximum_msg_size);
-       if (vp && (vp->vp_uint32 > mms)) {
-               mms = vp->vp_uint32;
+       if (vp && (vp->vp_uint16 > mms)) {
+               mms = vp->vp_uint16;
 
                if (mms > MAX_PACKET_SIZE) mms = MAX_PACKET_SIZE;
        }