]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Don't try to supersede static leases
authorTed Lemon <source@isc.org>
Fri, 8 Nov 1996 20:09:10 +0000 (20:09 +0000)
committerTed Lemon <source@isc.org>
Fri, 8 Nov 1996 20:09:10 +0000 (20:09 +0000)
common/memory.c
memory.c

index c5228186889969378a467312292d387c7ee21c3e..6f7617c2f01af7d4aa213bdadbdd0dbda0630986 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: memory.c,v 1.21 1996/08/30 20:14:03 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: memory.c,v 1.22 1996/11/08 20:09:10 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -430,6 +430,10 @@ int supersede_lease (comp, lease, commit)
        int enter_hwaddr = 0;
        struct lease *lp;
 
+       /* Static leases are not currently kept in the database... */
+       if (lease -> flags & STATIC_LEASE)
+               return 1;
+
        /* If the existing lease hasn't expired and has a different
           unique identifier or, if it doesn't have a unique
           identifier, a different hardware address, then the two
index c5228186889969378a467312292d387c7ee21c3e..6f7617c2f01af7d4aa213bdadbdd0dbda0630986 100644 (file)
--- a/memory.c
+++ b/memory.c
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: memory.c,v 1.21 1996/08/30 20:14:03 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: memory.c,v 1.22 1996/11/08 20:09:10 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -430,6 +430,10 @@ int supersede_lease (comp, lease, commit)
        int enter_hwaddr = 0;
        struct lease *lp;
 
+       /* Static leases are not currently kept in the database... */
+       if (lease -> flags & STATIC_LEASE)
+               return 1;
+
        /* If the existing lease hasn't expired and has a different
           unique identifier or, if it doesn't have a unique
           identifier, a different hardware address, then the two