]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Use global scope when there's no lease in check_collection.
authorTed Lemon <source@isc.org>
Fri, 29 Sep 2000 00:55:53 +0000 (00:55 +0000)
committerTed Lemon <source@isc.org>
Fri, 29 Sep 2000 00:55:53 +0000 (00:55 +0000)
server/class.c

index 432bc398430e947e0b93083670087dddd92a9163..d7ec82e32a857c75adc0753c91b81e3202b856ab 100644 (file)
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: class.c,v 1.23 2000/09/20 09:03:59 mellon Exp $ Copyright (c) 1998-2000 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: class.c,v 1.24 2000/09/29 00:55:53 mellon Exp $ Copyright (c) 1998-2000 The Internet Software Consortium.  All rights reserved.\n";
 
 #endif /* not lint */
 
@@ -112,7 +112,8 @@ int check_collection (packet, lease, collection)
                        status = (evaluate_data_expression
                                  (&data, packet, lease,
                                   packet -> options, (struct option_state *)0,
-                                  &lease -> scope, class -> submatch));
+                                  lease ? &lease -> scope : &global_scope,
+                                  class -> submatch));
                        if (status && data.len) {
                                nc = (struct class *)0;
                                if (class_hash_lookup (&nc, class -> hash,
@@ -182,7 +183,8 @@ int check_collection (packet, lease, collection)
                status = (evaluate_boolean_expression_result
                          (&ignorep, packet, lease,
                           packet -> options, (struct option_state *)0,
-                          &lease -> scope, class -> expr));
+                          lease ? &lease -> scope : &global_scope,
+                          class -> expr));
                if (status) {
                        matched = 1;
 #if defined (DEBUG_CLASS_MATCHING)