diff options
author | Ted Lemon <source@isc.org> | 1998-11-09 02:46:19 +0000 |
---|---|---|
committer | Ted Lemon <source@isc.org> | 1998-11-09 02:46:19 +0000 |
commit | 64e1dc1d5f3d0f9da57c1804ed365eaddcdbfcb9 (patch) | |
tree | f51e6b15b11a77166d46ceda1f8f36de1d478bd2 /server/class.c | |
parent | f197003dc9263279d348481f6515bec458655f54 (diff) | |
download | isc-dhcp-64e1dc1d5f3d0f9da57c1804ed365eaddcdbfcb9.tar.gz |
Fix up class matching code.
Diffstat (limited to 'server/class.c')
-rw-r--r-- | server/class.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/server/class.c b/server/class.c index 9d477d6d..3a90376c 100644 --- a/server/class.c +++ b/server/class.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: class.c,v 1.5 1998/11/06 03:25:45 mellon Exp $ Copyright (c) 1998 The Internet Software Consortium. All rights reserved.\n"; +"$Id: class.c,v 1.6 1998/11/09 02:46:19 mellon Exp $ Copyright (c) 1998 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -140,6 +140,8 @@ static char copyright[] = struct class unknown_class = { (struct class *)0, "unknown", + 0, + (struct lease *)0, (struct hash_table *)0, (struct expression *)0, (struct expression *)0, @@ -149,6 +151,8 @@ struct class unknown_class = { struct class known_class = { (struct class *)0, "unknown", + 0, + (struct lease *)0, (struct hash_table *)0, (struct expression *)0, (struct expression *)0, @@ -225,7 +229,7 @@ int check_collection (packet, collection) data.len))) { #if defined (DEBUG_CLASS_MATCHING) note ("matches subclass %s.", - data.len, data.data); + print_hex_1 (data.len, data.data, 60)); #endif classify (packet, class); matched = 1; @@ -235,11 +239,12 @@ int check_collection (packet, collection) memset (&data, 0, sizeof data); status = (evaluate_boolean_expression_result (packet, &packet -> options, class -> expr)); - if (status) + if (status) { matched = 1; #if defined (DEBUG_CLASS_MATCHING) - note ("matches class."); + note ("matches class."); #endif + } if (status && class -> spawn && evaluate_data_expression (&data, packet, @@ -247,7 +252,7 @@ int check_collection (packet, collection) class -> spawn)) { #if defined (DEBUG_CLASS_MATCHING) note ("spawning subclass %s.", - print_hex_1 (data.len, data.data)); + print_hex_1 (data.len, data.data, 60)); #endif nc = (struct class *) dmalloc (sizeof (struct class), "class spawn"); |