From 2bddf829f4cc36979feb3aed15711f520be7ee8a Mon Sep 17 00:00:00 2001 From: David Hankins Date: Mon, 17 Jul 2006 15:33:34 +0000 Subject: [PATCH] - The log message emitted when the 'leased-address' value was not available in dhcpd.conf "executable statements" has been updated to be more helpful. Manpage information for this value has also been updated. [ISC-Bugs #16136] --- RELNOTES | 4 ++++ common/dhcp-eval.5 | 9 +++++++-- common/tree.c | 6 ++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/RELNOTES b/RELNOTES index 409e03d13..c681b592f 100644 --- a/RELNOTES +++ b/RELNOTES @@ -161,6 +161,10 @@ and for prodding me into improving it. #if defined() clauses so that compilation without failover could be made possible. +- The log message emitted when the 'leased-address' value was not available + in dhcpd.conf "executable statements" has been updated to be more helpful. + Manpage information for this value has also been updated. + Changes since 3.0.4rc1 - The dhcp-options.5 manpage was updated to correct indentation errors diff --git a/common/dhcp-eval.5 b/common/dhcp-eval.5 index f7c0fde5d..b65714be5 100644 --- a/common/dhcp-eval.5 +++ b/common/dhcp-eval.5 @@ -1,4 +1,4 @@ -.\" $Id: dhcp-eval.5,v 1.21 2006/05/11 16:31:29 dhankins Exp $ +.\" $Id: dhcp-eval.5,v 1.22 2006/07/17 15:33:34 dhankins Exp $ .\" .\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") .\" Copyright (c) 1996-2003 by Internet Software Consortium @@ -301,7 +301,12 @@ four bytes. .RS 0.25i In any context where the client whose request is being processed has been assigned an IP address, this data expression returns that IP -address. +address. In any context where the client whose request is being +processed has not been assigned an ip address, if this data expression +is found in executable statements executed on that client's behalf, +a log message indicating "there is no lease associated with this client" +is syslogged to the debug level (this is considered dhcpd.conf debugging +information). .RE .PP .B binary-to-ascii (\fInumeric-expr1\fB, \fInumeric-expr2\fB, diff --git a/common/tree.c b/common/tree.c index bfabf3e13..140d0d535 100644 --- a/common/tree.c +++ b/common/tree.c @@ -34,7 +34,7 @@ #ifndef lint static char copyright[] = -"$Id: tree.c,v 1.106 2006/06/01 20:23:17 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n"; +"$Id: tree.c,v 1.107 2006/07/17 15:33:34 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -1950,7 +1950,9 @@ int evaluate_data_expression (result, packet, lease, client_state, case expr_leased_address: if (!lease) { - log_error ("data: leased_address: not available"); + log_debug("data: \"leased-address\" configuration " + "directive: there is no lease associated " + "with this client."); return 0; } result -> len = lease -> ip_addr.len; -- 2.47.3