mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-03 07:45:20 +00:00
Ensure that bootp packets are at least BOOTP_MIN_LEN bytes long
This commit is contained in:
3
bootp.c
3
bootp.c
@@ -190,7 +190,8 @@ void bootp (packet)
|
|||||||
pack options into the filename and server name buffers. */
|
pack options into the filename and server name buffers. */
|
||||||
|
|
||||||
cons_options (packet, &outgoing, options, 0);
|
cons_options (packet, &outgoing, options, 0);
|
||||||
|
if (outgoing.packet_length < BOOTP_MIN_LEN)
|
||||||
|
outgoing.packet_length = BOOTP_MIN_LEN;
|
||||||
|
|
||||||
/* Take the fields that we care about... */
|
/* Take the fields that we care about... */
|
||||||
raw.op = BOOTREPLY;
|
raw.op = BOOTREPLY;
|
||||||
|
@@ -190,7 +190,8 @@ void bootp (packet)
|
|||||||
pack options into the filename and server name buffers. */
|
pack options into the filename and server name buffers. */
|
||||||
|
|
||||||
cons_options (packet, &outgoing, options, 0);
|
cons_options (packet, &outgoing, options, 0);
|
||||||
|
if (outgoing.packet_length < BOOTP_MIN_LEN)
|
||||||
|
outgoing.packet_length = BOOTP_MIN_LEN;
|
||||||
|
|
||||||
/* Take the fields that we care about... */
|
/* Take the fields that we care about... */
|
||||||
raw.op = BOOTREPLY;
|
raw.op = BOOTREPLY;
|
||||||
|
Reference in New Issue
Block a user