]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
No need for a trailing zero byte after DHCPv4 end of options
authorNick Porter <nick@portercomputing.co.uk>
Mon, 7 Oct 2024 15:56:04 +0000 (16:56 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Tue, 8 Oct 2024 14:10:48 +0000 (15:10 +0100)
src/protocols/dhcpv4/base.c

index 3bfa3f8305248ef3f95084ba48ac49a2c8cbae9a..e9b1c874cc13bf6aa8f4d97f8703a9dec3a925e8 100644 (file)
@@ -527,7 +527,7 @@ ssize_t fr_dhcpv4_encode_dbuff(fr_dbuff_t *dbuff, dhcp_packet_t *original, int c
                if (len <= 0) break;
        }
 
-       FR_DBUFF_IN_BYTES_RETURN(&work_dbuff, FR_END_OF_OPTIONS, 0x00);
+       FR_DBUFF_IN_RETURN(&work_dbuff, (uint8_t)FR_END_OF_OPTIONS);
 
        /*
         *      FIXME: if (fr_dbuff_used(&work_dbuff) > mms),