summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2019-12-17 13:59:24 -0500
committerThomas Markwalder <tmark@isc.org>2019-12-17 13:59:24 -0500
commit9a2f9db55fc4024f5bc7799161752eea77e8290c (patch)
tree6c5bd2d6588fa34e05d0db0087387478fd180846 /server
parent79cfe1acf3ddc85708f47bb2b6ff031aed7199e3 (diff)
downloadisc-dhcp-9a2f9db55fc4024f5bc7799161752eea77e8290c.tar.gz
[master] Implement and use new option format type 'k'
Merges in #68.
Diffstat (limited to 'server')
-rw-r--r--server/ldap.c11
-rw-r--r--server/stables.c6
2 files changed, 9 insertions, 8 deletions
diff --git a/server/ldap.c b/server/ldap.c
index 46b13d00..8e80d5b5 100644
--- a/server/ldap.c
+++ b/server/ldap.c
@@ -1137,7 +1137,7 @@ _do_lookup_dhcp_int_option (struct option_state *options, int option_name)
{
struct option_cache *oc;
struct data_string db;
- int ret;
+ int ret = 0;
memset (&db, 0, sizeof (db));
oc = lookup_option (&server_universe, options, option_name);
@@ -1147,13 +1147,14 @@ _do_lookup_dhcp_int_option (struct option_state *options, int option_name)
(struct client_state *) NULL, options,
(struct option_state *) NULL,
&global_scope, oc, MDL) &&
- db.data != NULL && *db.data != '\0')
+ db.data != NULL)
{
- ret = strtol ((const char *) db.data, NULL, 10);
+ if (db.len == 4) {
+ ret = getULong(db.data);
+ }
+
data_string_forget (&db, MDL);
}
- else
- ret = 0;
return (ret);
}
diff --git a/server/stables.c b/server/stables.c
index d0d9fc36..43408c55 100644
--- a/server/stables.c
+++ b/server/stables.c
@@ -211,7 +211,7 @@ static struct option server_options[] = {
{ "limited-broadcast-address", "I", &server_universe, 33, 1 },
{ "remote-port", "S", &server_universe, 34, 1 },
{ "local-address", "I", &server_universe, 35, 1 },
- { "omapi-key", "d", &server_universe, 36, 1 },
+ { "omapi-key", "k", &server_universe, 36, 1 },
{ "stash-agent-options", "f", &server_universe, 37, 1 },
{ "ddns-ttl", "T", &server_universe, 38, 1 },
{ "ddns-update-style", "Nddns-styles.", &server_universe, 39, 1 },
@@ -241,7 +241,7 @@ static struct option server_options[] = {
#endif
#if defined(LDAP_CONFIGURATION)
{ "ldap-server", "t", &server_universe, 60, 1 },
- { "ldap-port", "d", &server_universe, 61, 1 },
+ { "ldap-port", "L", &server_universe, 61, 1 },
{ "ldap-username", "t", &server_universe, 62, 1 },
{ "ldap-password", "t", &server_universe, 63, 1 },
{ "ldap-base-dn", "t", &server_universe, 64, 1 },
@@ -259,7 +259,7 @@ static struct option server_options[] = {
{ "ldap-tls-crlcheck", "Nldap-tls-crlcheck.", &server_universe, 75, 1 },
{ "ldap-tls-ciphers", "t", &server_universe, 76, 1 },
{ "ldap-tls-randfile", "t", &server_universe, 77, 1 },
- { "ldap-init-retry", "d", &server_universe, SV_LDAP_INIT_RETRY, 1 },
+ { "ldap-init-retry", "L", &server_universe, SV_LDAP_INIT_RETRY, 1 },
#endif /* LDAP_USE_SSL */
#if defined(LDAP_USE_GSSAPI)
{ "ldap-gssapi-keytab", "t", &server_universe, SV_LDAP_GSSAPI_KEYTAB, 1},