]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Add support for 'on commit'.
authorTed Lemon <source@isc.org>
Sun, 18 Jul 1999 19:38:33 +0000 (19:38 +0000)
committerTed Lemon <source@isc.org>
Sun, 18 Jul 1999 19:38:33 +0000 (19:38 +0000)
server/bootp.c

index a0b630e5bd68206e925ca428b35654367048612d..eed80eb50df16875eeda7755218b4b95ebc38577 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: bootp.c,v 1.51 1999/07/06 17:07:12 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: bootp.c,v 1.52 1999/07/18 19:38:33 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -140,6 +140,7 @@ void bootp (packet)
                                                          SV_ALLOW_BOOTP))) {
                log_info ("%s: bootp disallowed", msgbuf);
                option_state_dereference (&options, "bootrequest");
+               static_lease_dereference (lease, "bootrequest");
                return;
        } 
 
@@ -149,6 +150,7 @@ void bootp (packet)
                                                          SV_ALLOW_BOOTING))) {
                log_info ("%s: booting disallowed", msgbuf);
                option_state_dereference (&options, "bootrequest");
+               static_lease_dereference (lease, "bootrequest");
                return;
        }
 
@@ -264,8 +266,13 @@ void bootp (packet)
                data_string_forget (&d1, "bootrequest");
        }
 
+       /* Execute the commit statements, if there are any. */
+       execute_statements (packet, lease, packet -> options,
+                           state -> options, lease -> on_commit);
+
        /* We're done with the option state. */
        option_state_dereference (&options, "bootrequest");
+       static_lease_dereference (lease, "bootrequest");
 
        /* Set up the hardware destination address... */
        hto.htype = packet -> raw -> htype;