From 5b5fcc81dfc4e9bbc4d3349e831b3e5b95af092e Mon Sep 17 00:00:00 2001 From: Ted Lemon Date: Fri, 29 Sep 2000 00:55:53 +0000 Subject: [PATCH] Use global scope when there's no lease in check_collection. --- server/class.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/class.c b/server/class.c index 432bc3984..d7ec82e32 100644 --- a/server/class.c +++ b/server/class.c @@ -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) -- 2.47.3