]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Don't try to move the lease if it doesn't have a pool.
authorTed Lemon <source@isc.org>
Sat, 6 Jan 2001 21:39:30 +0000 (21:39 +0000)
committerTed Lemon <source@isc.org>
Sat, 6 Jan 2001 21:39:30 +0000 (21:39 +0000)
server/mdb.c

index 18c058b595465c350fe0d357710736953b46cc61..2e089c39c074e34e5a34c4a736f8557636a9f9cf 100644 (file)
@@ -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: