diff options
author | Thomas Markwalder <tmark@isc.org> | 2017-12-11 07:45:10 -0500 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2017-12-11 07:45:10 -0500 |
commit | c2e5ee2882d6d9dba5e7227d432552a3ab75b9e2 (patch) | |
tree | 8d84f57734c3fa25769c863cabcf889dd1159910 /server/dhcpd.c | |
parent | 7b4f284e504380c252ab19c1107e67cd01383e09 (diff) | |
download | isc-dhcp-c2e5ee2882d6d9dba5e7227d432552a3ab75b9e2.tar.gz |
[master] Adds persist-eui-64-leases config parameter and support
Merges in rt45046.
Diffstat (limited to 'server/dhcpd.c')
-rw-r--r-- | server/dhcpd.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/server/dhcpd.c b/server/dhcpd.c index bf0036ca..614bc097 100644 --- a/server/dhcpd.c +++ b/server/dhcpd.c @@ -82,6 +82,10 @@ int dont_use_fsync = 0; /* 0 = default, use fsync, 1 = don't use fsync */ int server_id_check = 0; /* 0 = default, don't check server id, 1 = do check */ int prefix_length_mode = PLM_PREFER; +#ifdef EUI_64 +int persist_eui64 = 1; /* 1 = write EUI64 leases to disk, 0 = don't */ +#endif + 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; @@ -847,8 +851,9 @@ main(int argc, char **argv) { #endif /* test option should cause an early exit */ - if (cftest && !lftest) + if (cftest && !lftest) { exit(0); + } /* * First part of dealing with pid files. Check to see if @@ -1396,6 +1401,21 @@ void postconf_initialization (int quiet) } #endif +#ifdef EUI_64 + oc = lookup_option(&server_universe, options, SV_PERSIST_EUI_64_LEASES); + if (oc != NULL) { + persist_eui64 = evaluate_boolean_option_cache(NULL, NULL, NULL, + NULL, options, + NULL, + &global_scope, + oc, MDL); + } + + if (!persist_eui64) { + log_info("EUI64 leases will not be written to lease file"); + } +#endif + #if defined (BINARY_LEASES) if (local_family == AF_INET) { log_info("Source compiled to use binary-leases"); |