From: Ted Lemon Date: Sat, 6 Jan 2001 21:39:30 +0000 (+0000) Subject: Don't try to move the lease if it doesn't have a pool. X-Git-Tag: V3-BETA-2-PATCH-12~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6657e93a64c6303ae44858be4dbbb83e31898548;p=thirdparty%2Fdhcp.git Don't try to move the lease if it doesn't have a pool. --- diff --git a/server/mdb.c b/server/mdb.c index 18c058b59..2e089c39c 100644 --- a/server/mdb.c +++ b/server/mdb.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: mdb.c,v 1.48 2001/01/04 00:30:53 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n"; +"$Id: mdb.c,v 1.49 2001/01/06 21:39:30 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -945,6 +945,12 @@ int supersede_lease (comp, lease, commit, propogate, pimmediate) comp -> next_binding_state = lease -> next_binding_state; just_move_it: + if (!comp -> pool) { + log_error ("Supersede_lease: lease %s with no pool.", + piaddr (lease -> ip_addr)); + return 0; + } + /* Figure out which queue it's on. */ switch (comp -> binding_state) { case FTS_FREE: