diff options
author | Thomas Markwalder <tmark@isc.org> | 2016-07-07 14:11:26 -0400 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2016-07-07 14:11:26 -0400 |
commit | a5252220fbb8cc144b3706d6a391a004ad7924d4 (patch) | |
tree | 6cb93b7235d1cb5e90073e2ef88ed9124f8823f5 /server/dhcpd.c | |
parent | ad06e7ba21ae7eb243de6caab6d1aac4d6681daa (diff) | |
download | isc-dhcp-a5252220fbb8cc144b3706d6a391a004ad7924d4.tar.gz |
[master] Add abandon-lease-time parameter
Merges in rt41815.
Diffstat (limited to 'server/dhcpd.c')
-rw-r--r-- | server/dhcpd.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/server/dhcpd.c b/server/dhcpd.c index a42d7591..43642823 100644 --- a/server/dhcpd.c +++ b/server/dhcpd.c @@ -78,6 +78,7 @@ int prefix_length_mode = PLM_EXACT; int authoring_byte_order = 0; /* 0 = not set */ int lease_id_format = TOKEN_OCTAL; /* octal by default */ +u_int32_t abandon_lease_time = DEFAULT_ABANDON_LEASE_TIME; const char *path_dhcpd_conf = _PATH_DHCPD_CONF; const char *path_dhcpd_db = _PATH_DHCPD_DB; @@ -1241,6 +1242,20 @@ void postconf_initialization (int quiet) data_string_forget(&db, MDL); } + // Set global abandon-lease-time option. + oc = lookup_option (&server_universe, options, SV_ABANDON_LEASE_TIME); + if ((oc != NULL) && + evaluate_option_cache(&db, NULL, NULL, NULL, options, NULL, + &global_scope, oc, MDL)) { + if (db.len == sizeof (u_int32_t)) { + abandon_lease_time = getULong (db.data); + } else { + log_fatal("invalid abandon-lease-time"); + } + + data_string_forget (&db, MDL); + } + #if defined (BINARY_LEASES) if (local_family == AF_INET) { log_info("Source compiled to use binary-leases"); |