]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- Put back the code that checks the server configuration for the
authorTed Lemon <source@isc.org>
Tue, 12 Sep 2000 20:09:14 +0000 (20:09 +0000)
committerTed Lemon <source@isc.org>
Tue, 12 Sep 2000 20:09:14 +0000 (20:09 +0000)
  dhcp-max-message-size option, which was apparently lost in the
  transition from 2.0 to 3.0.

server/dhcp.c

index 232bc851db568b38450e6ea38bbde5c56fcaa316..457d9dbcbaded4e803f4d089ed6ea564d964afdb 100644 (file)
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: dhcp.c,v 1.165 2000/09/08 01:23:43 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: dhcp.c,v 1.166 2000/09/12 20:09:14 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -1861,6 +1861,18 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp)
                if (d1.len == sizeof (u_int16_t))
                        state -> max_message_size = getUShort (d1.data);
                data_string_forget (&d1, MDL);
+       } else {
+               oc = lookup_option (&dhcp_universe, state -> options,
+                                   DHO_DHCP_MAX_MESSAGE_SIZE);
+               if (oc &&
+                   evaluate_option_cache (&d1, packet, lease,
+                                          packet -> options, state -> options,
+                                          &lease -> scope, oc, MDL)) {
+                       if (d1.len == sizeof (u_int16_t))
+                               state -> max_message_size =
+                                       getUShort (d1.data);
+                       data_string_forget (&d1, MDL);
+               }
        }
 
        /* Now, if appropriate, put in DHCP-specific options that