mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
more fixups.
git-svn-id: file:///svn/unbound/trunk@4067 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
86f0baf146
commit
451e1900a9
4 changed files with 8 additions and 6 deletions
|
|
@ -582,7 +582,7 @@ daemon_fork(struct daemon* daemon)
|
||||||
dnsc_apply_cfg(daemon->dnscenv, daemon->cfg);
|
dnsc_apply_cfg(daemon->dnscenv, daemon->cfg);
|
||||||
#else
|
#else
|
||||||
fatal_exit("dnscrypt enabled in config but unbound was not built with "
|
fatal_exit("dnscrypt enabled in config but unbound was not built with "
|
||||||
"dnscypt support");
|
"dnscrypt support");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
/* create global local_zones */
|
/* create global local_zones */
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,8 @@ dnscrypt_server_uncurve(const KeyPair *keypair,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (*sldns_buffer_at(buffer, --len) == 0);
|
while (*sldns_buffer_at(buffer, --len) == 0)
|
||||||
|
;
|
||||||
|
|
||||||
if (*sldns_buffer_at(buffer, len) != 0x80) {
|
if (*sldns_buffer_at(buffer, len) != 0x80) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
@ -137,7 +138,7 @@ dnscrypt_hrtime(void)
|
||||||
uint64_t ts = (uint64_t)0U;
|
uint64_t ts = (uint64_t)0U;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = evutil_gettimeofday(&tv, NULL);
|
ret = gettimeofday(&tv, NULL);
|
||||||
assert(ret == 0);
|
assert(ret == 0);
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
ts = (uint64_t)tv.tv_sec * 1000000U + (uint64_t)tv.tv_usec;
|
ts = (uint64_t)tv.tv_sec * 1000000U + (uint64_t)tv.tv_usec;
|
||||||
|
|
@ -281,7 +282,7 @@ dnsc_parse_certs(struct dnsc_env *env, struct config_file *cfg)
|
||||||
head->str,
|
head->str,
|
||||||
(char *)(env->signed_certs + signed_cert_id),
|
(char *)(env->signed_certs + signed_cert_id),
|
||||||
sizeof(struct SignedCert)) != 0) {
|
sizeof(struct SignedCert)) != 0) {
|
||||||
fatal_exit("dnsc_parse_certs: failed to load %s", head->str);
|
fatal_exit("dnsc_parse_certs: failed to load %s: %s", head->str, strerror(errno));
|
||||||
}
|
}
|
||||||
verbose(VERB_OPS, "Loaded cert %s", head->str);
|
verbose(VERB_OPS, "Loaded cert %s", head->str);
|
||||||
}
|
}
|
||||||
|
|
@ -419,7 +420,7 @@ dnsc_parse_keys(struct dnsc_env *env, struct config_file *cfg)
|
||||||
head->str,
|
head->str,
|
||||||
(char *)(env->keypairs[keypair_id].crypt_secretkey),
|
(char *)(env->keypairs[keypair_id].crypt_secretkey),
|
||||||
crypto_box_SECRETKEYBYTES) != 0) {
|
crypto_box_SECRETKEYBYTES) != 0) {
|
||||||
fatal_exit("dnsc_parse_keys: failed to load %s", head->str);
|
fatal_exit("dnsc_parse_keys: failed to load %s: %s", head->str, strerror(errno));
|
||||||
}
|
}
|
||||||
verbose(VERB_OPS, "Loaded key %s", head->str);
|
verbose(VERB_OPS, "Loaded key %s", head->str);
|
||||||
if (crypto_scalarmult_base(env->keypairs[keypair_id].crypt_publickey,
|
if (crypto_scalarmult_base(env->keypairs[keypair_id].crypt_publickey,
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ struct dnscrypt_query_header {
|
||||||
/**
|
/**
|
||||||
* Initialize DNSCrypt enviroment.
|
* Initialize DNSCrypt enviroment.
|
||||||
* Initialize sodium library and allocate the dnsc_env structure.
|
* Initialize sodium library and allocate the dnsc_env structure.
|
||||||
* \return an unitialized struct dnsc_env.
|
* \return an uninitialized struct dnsc_env.
|
||||||
*/
|
*/
|
||||||
struct dnsc_env * dnsc_create(void);
|
struct dnsc_env * dnsc_create(void);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1072,6 +1072,7 @@ ports_create_if(const char* ifname, int do_auto, int do_udp, int do_tcp,
|
||||||
(!strchr(ifname, '@') && atoi(port) == dnscrypt_port));
|
(!strchr(ifname, '@') && atoi(port) == dnscrypt_port));
|
||||||
#else
|
#else
|
||||||
int is_dnscrypt = 0;
|
int is_dnscrypt = 0;
|
||||||
|
(void)dnscrypt_port;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(!do_udp && !do_tcp)
|
if(!do_udp && !do_tcp)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue