]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Support abandoned keyword in leases
authorTed Lemon <source@isc.org>
Thu, 6 Mar 1997 19:29:39 +0000 (19:29 +0000)
committerTed Lemon <source@isc.org>
Thu, 6 Mar 1997 19:29:39 +0000 (19:29 +0000)
server/confpars.c
server/db.c

index 6727bda85ee3d7d4d0fe74b8538e118765bc4d31..b8adf9a2d1363158e37129b17f3d1c9327b7a9d3 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: confpars.c,v 1.39 1997/02/22 08:41:01 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: confpars.c,v 1.40 1997/03/06 19:29:39 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -1268,6 +1268,11 @@ struct lease *parse_lease_declaration (cfile)
                                lease.flags |= BOOTP_LEASE;
                                break;
 
+                             case ABANDONED:
+                               seenbit = 256;
+                               lease.flags |= ABANDONED_LEASE;
+                               break;
+
                              default:
                                skip_to_semi (cfile);
                                seenbit = 0;
index afdaff2ec47d8d8ec757e8ee98c086e1753c0f1d..ffc1966763ec2340cefe2a565727e2a64fadc66d 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: db.c,v 1.8 1996/09/02 21:16:24 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: db.c,v 1.9 1997/03/06 19:29:39 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -126,6 +126,13 @@ int write_lease (lease)
                        ++errors;
                }
        }
+       if (lease -> flags & ABANDONED_LEASE) {
+               errno = 0;
+               fprintf (db_file, "\n\tabandoned;");
+               if (errno) {
+                       ++errors;
+               }
+       }
        errno = 0;
        fputs ("\n}\n", db_file);
        if (errno) {