#ifndef lint
static char copyright[] =
-"$Id: bootp.c,v 1.46 1999/05/27 14:58:07 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: bootp.c,v 1.47 1999/06/10 00:36:18 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
option_state_allocate (&options, "bootrequest");
/* Execute the subnet statements. */
- execute_statements_in_scope (packet, options, options,
+ execute_statements_in_scope (packet, packet -> options, options,
lease -> subnet -> group,
(struct group *)0);
+ /* Execute statements from class scopes. */
+ for (i = packet -> class_count; i > 0; i--) {
+ execute_statements_in_scope
+ (packet, packet -> options, options,
+ packet -> classes [i - 1] -> group,
+ lease -> subnet -> group);
+ }
+
/* Execute the host statements. */
- execute_statements_in_scope (packet, options, options, hp -> group,
- hp -> group);
+ execute_statements_in_scope (packet, packet -> options, options,
+ hp -> group, subnet -> group);
/* Drop the request if it's not allowed for this client. */
if (evaluate_boolean_option_cache (packet, options,
#ifndef lint
static char copyright[] =
-"$Id: dhcp.c,v 1.91 1999/05/27 14:56:51 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dhcp.c,v 1.92 1999/06/10 00:36:27 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
lease -> subnet -> group);
/* Execute statements from class scopes. */
- if (offer) {
- for (i = packet -> class_count; i > 0; i--) {
- execute_statements_in_scope
- (packet, packet -> options,
- state -> options,
- packet -> classes [i - 1] -> group,
- (lease -> pool
- ? lease -> pool -> group
- : lease -> subnet -> group));
- }
+ for (i = packet -> class_count; i > 0; i--) {
+ execute_statements_in_scope
+ (packet, packet -> options, state -> options,
+ packet -> classes [i - 1] -> group,
+ (lease -> pool
+ ? lease -> pool -> group
+ : lease -> subnet -> group));
}
/* If we have a host_decl structure, run the options associated