mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-30 13:57:50 +00:00
Get rid of any 'on' statements on a lease before running the in-scope statements.
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: dhcp.c,v 1.106 1999/08/19 18:59:13 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: dhcp.c,v 1.107 1999/09/22 17:30:33 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -871,6 +871,19 @@ void ack_lease (packet, lease, offer, when, msg)
|
|||||||
(struct agent_options *)0;
|
(struct agent_options *)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Get rid of any old expiry or release statements - by executing
|
||||||
|
the statements below, we will be inserting new ones if there are
|
||||||
|
any to insert. */
|
||||||
|
if (lease -> on_expiry)
|
||||||
|
executable_statement_dereference (&lease -> on_expiry,
|
||||||
|
"ack_lease");
|
||||||
|
if (lease -> on_commit)
|
||||||
|
executable_statement_dereference (&lease -> on_commit,
|
||||||
|
"ack_lease");
|
||||||
|
if (lease -> on_release)
|
||||||
|
executable_statement_dereference (&lease -> on_release,
|
||||||
|
"ack_lease");
|
||||||
|
|
||||||
/* Execute statements in scope starting with the subnet scope. */
|
/* Execute statements in scope starting with the subnet scope. */
|
||||||
execute_statements_in_scope (packet, lease,
|
execute_statements_in_scope (packet, lease,
|
||||||
packet -> options,
|
packet -> options,
|
||||||
|
Reference in New Issue
Block a user