]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Ensure that bootp packets are at least BOOTP_MIN_LEN bytes long
authorTed Lemon <source@isc.org>
Mon, 24 Jun 1996 20:28:29 +0000 (20:28 +0000)
committerTed Lemon <source@isc.org>
Mon, 24 Jun 1996 20:28:29 +0000 (20:28 +0000)
bootp.c
server/bootp.c

diff --git a/bootp.c b/bootp.c
index 078dfb973c2a832a9547092277843de70ee6aac0..435f7a6415d3467b66f3eacf9714f36d7ba67d45 100644 (file)
--- a/bootp.c
+++ b/bootp.c
@@ -190,7 +190,8 @@ void bootp (packet)
           pack options into the filename and server name buffers. */
 
        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... */
        raw.op = BOOTREPLY;
index 078dfb973c2a832a9547092277843de70ee6aac0..435f7a6415d3467b66f3eacf9714f36d7ba67d45 100644 (file)
@@ -190,7 +190,8 @@ void bootp (packet)
           pack options into the filename and server name buffers. */
 
        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... */
        raw.op = BOOTREPLY;