From: Ted Lemon Date: Sun, 18 Jul 1999 19:38:33 +0000 (+0000) Subject: Add support for 'on commit'. X-Git-Tag: V3-BETA-1-PATCH-2~5^2~187 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26413cf1116058622544c76aedb9f165211797e6;p=thirdparty%2Fdhcp.git Add support for 'on commit'. --- diff --git a/server/bootp.c b/server/bootp.c index a0b630e5b..eed80eb50 100644 --- a/server/bootp.c +++ b/server/bootp.c @@ -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;