diff options
author | Ted Lemon <source@isc.org> | 1999-06-10 00:36:27 +0000 |
---|---|---|
committer | Ted Lemon <source@isc.org> | 1999-06-10 00:36:27 +0000 |
commit | fa661adb98c22e5230ccc06677e2d0d791638d1e (patch) | |
tree | f6e6f2a6a83ddaa66f60816137ef80b647be7cb5 /server/bootp.c | |
parent | 285da7c75d7fa3f959c78c2f0e411203bdc6aa8f (diff) | |
download | isc-dhcp-fa661adb98c22e5230ccc06677e2d0d791638d1e.tar.gz |
Do classing for BOOTP clients as well as DHCP clients.
Diffstat (limited to 'server/bootp.c')
-rw-r--r-- | server/bootp.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/server/bootp.c b/server/bootp.c index 552abe47..443c0a8c 100644 --- a/server/bootp.c +++ b/server/bootp.c @@ -22,7 +22,7 @@ #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" @@ -117,13 +117,21 @@ void bootp (packet) 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, |