Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/dist/dhcp/server Get rid of an extremely annoying message lo...



details:   https://anonhg.NetBSD.org/src/rev/254e3192a8a8
branches:  trunk
changeset: 545602:254e3192a8a8
user:      drochner <drochner%NetBSD.org@localhost>
date:      Fri Apr 11 17:11:11 2003 +0000

description:
Get rid of an extremely annoying message logged with "error"
priority:
"<src address>: network <whatever>: no free leases"
on each "foreign" request if I'm just not serving for
unknown clients.
Replace it which a less misleading message at "info" priority.

diffstat:

 dist/dhcp/server/dhcp.c |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (24 lines):

diff -r 233811166cbd -r 254e3192a8a8 dist/dhcp/server/dhcp.c
--- a/dist/dhcp/server/dhcp.c   Fri Apr 11 16:15:28 2003 +0000
+++ b/dist/dhcp/server/dhcp.c   Fri Apr 11 17:11:11 2003 +0000
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: dhcp.c,v 1.4 2003/02/18 17:08:44 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: dhcp.c,v 1.5 2003/04/11 17:11:11 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -328,6 +328,11 @@
 
        /* If we didn't find a lease, try to allocate one... */
        if (!lease) {
+               if (!packet -> shared_network -> pools) {
+                       log_info ("%s: network %s: no address pool",
+                                 msgbuf, packet -> shared_network -> name);
+                       return;
+               }
                if (!allocate_lease (&lease, packet,
                                     packet -> shared_network -> pools, 
                                     &peer_has_leases)) {



Home | Main Index | Thread Index | Old Index