mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-12 07:13:50 -05:00
- initialize statistics totals for printout.
- in authzone check that node exists before adding rrset. - in unbound-anchor, use readwrite memory BIO. - assertion in autotrust that packed rrset is formed correctly. git-svn-id: file:///svn/unbound/trunk@4903 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
8dd6efe5ed
commit
2e9d09b961
6 changed files with 17 additions and 12 deletions
|
|
@ -1070,6 +1070,7 @@ do_stats(RES* ssl, struct daemon_remote* rc, int reset)
|
|||
struct ub_stats_info total;
|
||||
struct ub_stats_info s;
|
||||
int i;
|
||||
memset(&total, 0, sizeof(total));
|
||||
log_assert(daemon->num > 0);
|
||||
/* gather all thread statistics in one place */
|
||||
for(i=0; i<daemon->num; i++) {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,10 @@
|
|||
- check for null in delegation point during iterator refetch
|
||||
in forward zone.
|
||||
- neater pointer cast in libunbound context quit routine.
|
||||
- initialize statistics totals for printout.
|
||||
- in authzone check that node exists before adding rrset.
|
||||
- in unbound-anchor, use readwrite memory BIO.
|
||||
- assertion in autotrust that packed rrset is formed correctly.
|
||||
|
||||
11 September 2018: Wouter
|
||||
- Fixed unused return value warnings in contrib/fastrpz.patch for
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ msg_add_rrset_an(struct auth_zone* z, struct regional* region,
|
|||
{
|
||||
log_assert(msg->rep->ns_numrrsets == 0);
|
||||
log_assert(msg->rep->ar_numrrsets == 0);
|
||||
if(!rrset)
|
||||
if(!rrset || !node)
|
||||
return 1;
|
||||
if(msg_rrset_duplicate(msg, node->name, node->namelen, rrset->type,
|
||||
z->dclass))
|
||||
|
|
@ -242,7 +242,7 @@ msg_add_rrset_ns(struct auth_zone* z, struct regional* region,
|
|||
struct dns_msg* msg, struct auth_data* node, struct auth_rrset* rrset)
|
||||
{
|
||||
log_assert(msg->rep->ar_numrrsets == 0);
|
||||
if(!rrset)
|
||||
if(!rrset || !node)
|
||||
return 1;
|
||||
if(msg_rrset_duplicate(msg, node->name, node->namelen, rrset->type,
|
||||
z->dclass))
|
||||
|
|
@ -265,7 +265,7 @@ static int
|
|||
msg_add_rrset_ar(struct auth_zone* z, struct regional* region,
|
||||
struct dns_msg* msg, struct auth_data* node, struct auth_rrset* rrset)
|
||||
{
|
||||
if(!rrset)
|
||||
if(!rrset || !node)
|
||||
return 1;
|
||||
if(msg_rrset_duplicate(msg, node->name, node->namelen, rrset->type,
|
||||
z->dclass))
|
||||
|
|
|
|||
|
|
@ -1097,11 +1097,14 @@ read_http_result(SSL* ssl)
|
|||
}
|
||||
if(!data) return NULL;
|
||||
if(verb >= 4) print_data("read data", data, (int)len);
|
||||
m = BIO_new_mem_buf(data, (int)len);
|
||||
m = BIO_new(BIO_s_mem());
|
||||
if(!m) {
|
||||
if(verb) printf("out of memory\n");
|
||||
free(data);
|
||||
exit(0);
|
||||
}
|
||||
BIO_write(m, data, (int)len);
|
||||
free(data);
|
||||
return m;
|
||||
}
|
||||
|
||||
|
|
@ -1172,10 +1175,6 @@ https(struct ip_list* ip_list, const char* pathname, const char* urlname)
|
|||
static void
|
||||
free_file_bio(BIO* bio)
|
||||
{
|
||||
char* pp = NULL;
|
||||
(void)BIO_reset(bio);
|
||||
(void)BIO_get_mem_data(bio, &pp);
|
||||
free(pp);
|
||||
BIO_free(bio);
|
||||
}
|
||||
|
||||
|
|
@ -1603,7 +1602,7 @@ xml_parse(BIO* xml, time_t now)
|
|||
xml_parse_setup(parser, &data, now);
|
||||
|
||||
/* parse it */
|
||||
(void)BIO_reset(xml);
|
||||
(void)BIO_seek(xml, 0);
|
||||
len = (int)BIO_get_mem_data(xml, &pp);
|
||||
if(!len || !pp) {
|
||||
if(verb) printf("out of memory\n");
|
||||
|
|
@ -1777,8 +1776,8 @@ verify_p7sig(BIO* data, BIO* p7s, STACK_OF(X509)* trust, const char* p7signer)
|
|||
X509_VERIFY_PARAM_free(param);
|
||||
#endif
|
||||
|
||||
(void)BIO_reset(p7s);
|
||||
(void)BIO_reset(data);
|
||||
(void)BIO_seek(p7s, 0);
|
||||
(void)BIO_seek(data, 0);
|
||||
|
||||
/* convert p7s to p7 (the signature) */
|
||||
p7 = d2i_PKCS7_bio(p7s, NULL);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ if test ! -z "$WINAPPS"; then WIN_SRC="winrc/*.c"; fi
|
|||
cd $PRE; cd $srcdir
|
||||
# check the files in the srcdir
|
||||
fail="no"
|
||||
for x in cachedb/*.c daemon/*.c dns64/*.c $DNSCRYPT_SRC $DNSTAP_SRC edns-subnet/*.c ipsecmod/*.c iterator/*.c libunbound/*.c $PYTHONMOD_SRC respip/*.c services/*.c services/*/*.c sldns/*.c smallapp/*.c util/*.c validator/*.c $WIN_SRC $compatfiles testcode/*.c; do
|
||||
for x in cachedb/*.c daemon/*.c dns64/*.c $DNSCRYPT_SRC $DNSTAP_SRC edns-subnet/*.c ipsecmod/*.c iterator/*.c libunbound/*.c $PYTHONMOD_SRC respip/*.c services/*.c services/*/*.c sldns/*.c smallapp/*.c util/*.c util/*/*.c validator/*.c $WIN_SRC $compatfiles testcode/*.c; do
|
||||
if test "$x" = "util/configlexer.c"; then continue; fi
|
||||
if test "$x" = "util/configparser.c"; then continue; fi
|
||||
if test "$x" = "testcode/signit.c"; then continue; fi
|
||||
|
|
|
|||
|
|
@ -718,6 +718,7 @@ packed_rrset_heap_data(int iter(struct autr_ta**, uint8_t**, size_t*,
|
|||
list_i = list;
|
||||
i = 0;
|
||||
while(iter(&list_i, &rr, &rr_len, &dname_len)) {
|
||||
log_assert(data->rr_data[i]);
|
||||
memmove(data->rr_data[i],
|
||||
sldns_wirerr_get_rdatawl(rr, rr_len, dname_len),
|
||||
data->rr_len[i]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue