#ifndef lint
static char copyright[] =
-"$Id: dhcp.c,v 1.69 1998/11/06 01:04:32 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dhcp.c,v 1.70 1998/11/06 02:59:11 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
if (!locate_network (packet) && packet -> packet_type != DHCPREQUEST)
return;
+ /* Classify the client. */
+ classify_client (packet);
+
switch (packet -> packet_type) {
case DHCPDISCOVER:
dhcpdiscover (packet);
{
struct lease *lease;
- /* Classify the client. */
- classify_client (packet);
-
note ("DHCPDISCOVER from %s via %s",
print_hw_addr (packet -> raw -> htype,
packet -> raw -> hlen,
return;
}
- /* XXX Process class restrictions. */
-
/* Allocate a lease state structure... */
state = new_lease_state ("ack_lease");
if (!state)
/* Vendor and user classes are only supported for DHCP clients. */
if (state -> offer) {
- /* XXX process class stuff here. */
+ for (i = packet -> class_count; i > 0; i--) {
+ execute_statements_in_scope
+ (packet, &state -> options,
+ packet -> classes [i - 1] -> group,
+ (struct group *)0);
+ }
}
/* If we have a host_decl structure, run the options associated