From: Ted Lemon Date: Tue, 12 Sep 2000 20:09:14 +0000 (+0000) Subject: - Put back the code that checks the server configuration for the X-Git-Tag: V3-BETA-2-PATCH-4~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c76aff911eac7f4d41db17f5c10400658fb8da43;p=thirdparty%2Fdhcp.git - Put back the code that checks the server configuration for the dhcp-max-message-size option, which was apparently lost in the transition from 2.0 to 3.0. --- diff --git a/server/dhcp.c b/server/dhcp.c index 232bc851d..457d9dbcb 100644 --- a/server/dhcp.c +++ b/server/dhcp.c @@ -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