mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-31 22:35:25 +00:00
Move handling of on_release hooks and nsupdate to release_lease()
This commit is contained in:
16
server/mdb.c
16
server/mdb.c
@@ -22,7 +22,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: mdb.c,v 1.3 1999/10/01 03:26:45 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: mdb.c,v 1.4 1999/10/05 00:03:24 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@@ -993,6 +993,20 @@ void release_lease (lease)
|
||||
{
|
||||
struct lease lt;
|
||||
|
||||
#if defined (NSUPDATE) && 0
|
||||
nsupdate (lease, lease -> state, packet, DELETE);
|
||||
#endif
|
||||
|
||||
/* If there are statements to execute when the lease is
|
||||
committed, execute them. */
|
||||
if (lease -> on_release) {
|
||||
execute_statements (packet, lease, packet -> options,
|
||||
(struct option_state *)0, /* XXX */
|
||||
lease -> on_release);
|
||||
executable_statement_dereference (&lease -> on_release,
|
||||
"dhcprelease");
|
||||
}
|
||||
|
||||
lt = *lease;
|
||||
if (lt.ends > cur_time) {
|
||||
lt.ends = cur_time;
|
||||
|
Reference in New Issue
Block a user