diff options
author | Thomas Markwalder <tmark@isc.org> | 2017-06-29 08:50:56 -0400 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2017-06-29 08:50:56 -0400 |
commit | 30afd7dbfa4c60736ee926e6621631b0a3bc9523 (patch) | |
tree | 6e1dd433e73ea0202f76057bc01112f0aac3390d /common | |
parent | 5c03ed373d91b116475fbbc00348a7082db6e14c (diff) | |
download | isc-dhcp-30afd7dbfa4c60736ee926e6621631b0a3bc9523.tar.gz |
[master] Removed obsolete source directory minires.
Merges in rt45471.
Diffstat (limited to 'common')
-rw-r--r-- | common/dns.c | 49 | ||||
-rw-r--r-- | common/ns_name.c | 2 | ||||
-rw-r--r-- | common/options.c | 6 |
3 files changed, 4 insertions, 53 deletions
diff --git a/common/dns.c b/common/dns.c index 2ca4ba8b..18ad7040 100644 --- a/common/dns.c +++ b/common/dns.c @@ -608,55 +608,6 @@ ddns_cb_forget_zone(dhcp_ddns_cb_t *ddns_cb) ISC_LINK_INIT(&ddns_cb->zone_addrs[i], link); } } - -isc_result_t find_tsig_key (ns_tsig_key **key, const char *zname, - struct dns_zone *zone) -{ - ns_tsig_key *tkey; - - if (!zone) - return ISC_R_NOTFOUND; - - if (!zone -> key) { - return DHCP_R_KEY_UNKNOWN; - } - - if ((!zone -> key -> name || - strlen (zone -> key -> name) > NS_MAXDNAME) || - (!zone -> key -> algorithm || - strlen (zone -> key -> algorithm) > NS_MAXDNAME) || - (!zone -> key) || - (!zone -> key -> key) || - (zone -> key -> key -> len == 0)) { - return DHCP_R_INVALIDKEY; - } - tkey = dmalloc (sizeof *tkey, MDL); - if (!tkey) { - nomem: - return ISC_R_NOMEMORY; - } - memset (tkey, 0, sizeof *tkey); - tkey -> data = dmalloc (zone -> key -> key -> len, MDL); - if (!tkey -> data) { - dfree (tkey, MDL); - goto nomem; - } - strcpy (tkey -> name, zone -> key -> name); - strcpy (tkey -> alg, zone -> key -> algorithm); - memcpy (tkey -> data, - zone -> key -> key -> value, zone -> key -> key -> len); - tkey -> len = zone -> key -> key -> len; - *key = tkey; - return ISC_R_SUCCESS; -} - -void tkey_free (ns_tsig_key **key) -{ - if ((*key) -> data) - dfree ((*key) -> data, MDL); - dfree ((*key), MDL); - *key = (ns_tsig_key *)0; -} #endif isc_result_t remove_dns_zone (struct dns_zone *zone) diff --git a/common/ns_name.c b/common/ns_name.c index 829fe146..8630008b 100644 --- a/common/ns_name.c +++ b/common/ns_name.c @@ -30,7 +30,7 @@ #include <string.h> #include <ctype.h> -#include "minires.h" +#include "ns_name.h" #include "arpa/nameser.h" /* Data. */ diff --git a/common/options.c b/common/options.c index b0dcab42..ba0a6ecd 100644 --- a/common/options.c +++ b/common/options.c @@ -2059,14 +2059,14 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes) /* If emit_quotes, then use ISC DHCP * escapes. Otherwise, rely only on - * ns_name_ntop(). + * MRns_name_ntop(). */ if (emit_quotes) { nbp = nbuff; pretty_domain(&op, endbuf-1, &nbp, nend); } else { - /* ns_name_ntop() includes + /* MRns_name_ntop() includes * a trailing NUL in its * count. */ @@ -3259,7 +3259,7 @@ int nwip_option_space_encapsulate (result, packet, lease, client_state, return status; } -/* We don't want to use ns_name_pton()...it doesn't tell us how many bytes +/* We don't want to use MRns_name_pton()...it doesn't tell us how many bytes * it has consumed, and it plays havoc with our escapes. * * So this function does DNS encoding, and returns either the number of |