Skip to content

Commit

Permalink
Merge pull request #5 from internetstandards/inl_1.19.1
Browse files Browse the repository at this point in the history
Update the internetnl branch to version 1.19.1
  • Loading branch information
mxsasha authored Feb 13, 2024
2 parents 09b62cc + 2cb38ec commit b78aef7
Show file tree
Hide file tree
Showing 20 changed files with 861 additions and 185 deletions.
25 changes: 13 additions & 12 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for unbound 1.19.0.
# Generated by GNU Autoconf 2.69 for unbound 1.19.1.
#
# Report bugs to <[email protected] or https://github.com/NLnetLabs/unbound/issues>.
#
Expand Down Expand Up @@ -591,8 +591,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='unbound'
PACKAGE_TARNAME='unbound'
PACKAGE_VERSION='1.19.0'
PACKAGE_STRING='unbound 1.19.0'
PACKAGE_VERSION='1.19.1'
PACKAGE_STRING='unbound 1.19.1'
PACKAGE_BUGREPORT='[email protected] or https://github.com/NLnetLabs/unbound/issues'
PACKAGE_URL=''

Expand Down Expand Up @@ -1478,7 +1478,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures unbound 1.19.0 to adapt to many kinds of systems.
\`configure' configures unbound 1.19.1 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

Expand Down Expand Up @@ -1544,7 +1544,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of unbound 1.19.0:";;
short | recursive ) echo "Configuration of unbound 1.19.1:";;
esac
cat <<\_ACEOF

Expand Down Expand Up @@ -1787,7 +1787,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
unbound configure 1.19.0
unbound configure 1.19.1
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2496,7 +2496,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by unbound $as_me 1.19.0, which was
It was created by unbound $as_me 1.19.1, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ $0 $@
Expand Down Expand Up @@ -2848,11 +2848,11 @@ UNBOUND_VERSION_MAJOR=1

UNBOUND_VERSION_MINOR=19

UNBOUND_VERSION_MICRO=0
UNBOUND_VERSION_MICRO=1


LIBUNBOUND_CURRENT=9
LIBUNBOUND_REVISION=23
LIBUNBOUND_REVISION=24
LIBUNBOUND_AGE=1
# 1.0.0 had 0:12:0
# 1.0.1 had 0:13:0
Expand Down Expand Up @@ -2943,6 +2943,7 @@ LIBUNBOUND_AGE=1
# 1.17.1 had 9:21:1
# 1.18.0 had 9:22:1
# 1.19.0 had 9:23:1
# 1.19.1 had 9:24:1

# Current -- the number of the binary API that we're implementing
# Revision -- which iteration of the implementation of the binary
Expand Down Expand Up @@ -21913,7 +21914,7 @@ _ACEOF



version=1.19.0
version=1.19.1

date=`date +'%b %e, %Y'`

Expand Down Expand Up @@ -22432,7 +22433,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by unbound $as_me 1.19.0, which was
This file was extended by unbound $as_me 1.19.1, which was
generated by GNU Autoconf 2.69. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -22498,7 +22499,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
unbound config.status 1.19.0
unbound config.status 1.19.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

Expand Down
5 changes: 3 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ sinclude(dnscrypt/dnscrypt.m4)
# must be numbers. ac_defun because of later processing
m4_define([VERSION_MAJOR],[1])
m4_define([VERSION_MINOR],[19])
m4_define([VERSION_MICRO],[0])
m4_define([VERSION_MICRO],[1])
AC_INIT([unbound],m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]),[[email protected] or https://github.com/NLnetLabs/unbound/issues],[unbound])
AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR])
AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR])
AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO])

LIBUNBOUND_CURRENT=9
LIBUNBOUND_REVISION=23
LIBUNBOUND_REVISION=24
LIBUNBOUND_AGE=1
# 1.0.0 had 0:12:0
# 1.0.1 had 0:13:0
Expand Down Expand Up @@ -109,6 +109,7 @@ LIBUNBOUND_AGE=1
# 1.17.1 had 9:21:1
# 1.18.0 had 9:22:1
# 1.19.0 had 9:23:1
# 1.19.1 had 9:24:1

# Current -- the number of the binary API that we're implementing
# Revision -- which iteration of the implementation of the binary
Expand Down
3 changes: 2 additions & 1 deletion services/authzone.c
Original file line number Diff line number Diff line change
Expand Up @@ -7774,6 +7774,7 @@ static int zonemd_dnssec_verify_rrset(struct auth_zone* z,
enum sec_status sec;
struct val_env* ve;
int m;
int verified = 0;
m = modstack_find(mods, "validator");
if(m == -1) {
auth_zone_log(z->name, VERB_ALGO, "zonemd dnssec verify: have "
Expand All @@ -7797,7 +7798,7 @@ static int zonemd_dnssec_verify_rrset(struct auth_zone* z,
"zonemd: verify %s RRset with DNSKEY", typestr);
}
sec = dnskeyset_verify_rrset(env, ve, &pk, dnskey, sigalg, why_bogus, NULL,
LDNS_SECTION_ANSWER, NULL);
LDNS_SECTION_ANSWER, NULL, &verified);
if(sec == sec_status_secure) {
return 1;
}
Expand Down
22 changes: 22 additions & 0 deletions services/cache/dns.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,28 @@ tomsg(struct module_env* env, struct query_info* q, struct reply_info* r,
return msg;
}

struct dns_msg*
dns_msg_deepcopy_region(struct dns_msg* origin, struct regional* region)
{
size_t i;
struct dns_msg* res = NULL;
res = gen_dns_msg(region, &origin->qinfo, origin->rep->rrset_count);
if(!res) return NULL;
*res->rep = *origin->rep;
if(origin->rep->reason_bogus_str) {
res->rep->reason_bogus_str = regional_strdup(region,
origin->rep->reason_bogus_str);
}
for(i=0; i<res->rep->rrset_count; i++) {
res->rep->rrsets[i] = packed_rrset_copy_region(
origin->rep->rrsets[i], region, 0);
if(!res->rep->rrsets[i]) {
return NULL;
}
}
return res;
}

/** synthesize RRset-only response from cached RRset item */
static struct dns_msg*
rrset_msg(struct ub_packed_rrset_key* rrset, struct regional* region,
Expand Down
9 changes: 9 additions & 0 deletions services/cache/dns.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,15 @@ struct dns_msg* tomsg(struct module_env* env, struct query_info* q,
struct reply_info* r, struct regional* region, time_t now,
int allow_expired, struct regional* scratch);

/**
* Deep copy a dns_msg to a region.
* @param origin: the dns_msg to copy.
* @param region: the region to copy all the data to.
* @return the new dns_msg or NULL on malloc error.
*/
struct dns_msg* dns_msg_deepcopy_region(struct dns_msg* origin,
struct regional* region);

/**
* Find cached message
* @param env: module environment with the DNS cache.
Expand Down
7 changes: 4 additions & 3 deletions testcode/unitverify.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ verifytest_rrset(struct module_env* env, struct val_env* ve,
enum sec_status sec;
char* reason = NULL;
uint8_t sigalg[ALGO_NEEDS_MAX+1];
int verified = 0;
if(vsig) {
log_nametypeclass(VERB_QUERY, "verify of rrset",
rrset->rk.dname, ntohs(rrset->rk.type),
Expand All @@ -188,7 +189,7 @@ verifytest_rrset(struct module_env* env, struct val_env* ve,
setup_sigalg(dnskey, sigalg); /* check all algorithms in the dnskey */
/* ok to give null as qstate here, won't be used for answer section. */
sec = dnskeyset_verify_rrset(env, ve, rrset, dnskey, sigalg, &reason, NULL,
LDNS_SECTION_ANSWER, NULL);
LDNS_SECTION_ANSWER, NULL, &verified);
if(vsig) {
printf("verify outcome is: %s %s\n", sec_status_to_string(sec),
reason?reason:"");
Expand Down Expand Up @@ -442,9 +443,9 @@ nsec3_hash_test_entry(struct entry* e, rbtree_type* ct,

ret = nsec3_hash_name(ct, region, buf, nsec3, 0, qname,
qinfo.qname_len, &hash);
if(ret != 1) {
if(ret < 1) {
printf("Bad nsec3_hash_name retcode %d\n", ret);
unit_assert(ret == 1);
unit_assert(ret == 1 || ret == 2);
}
unit_assert(hash->dname && hash->hash && hash->hash_len &&
hash->b32 && hash->b32_len);
Expand Down
3 changes: 3 additions & 0 deletions testdata/val_any.rpl
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ SECTION QUESTION
example.com. IN ANY
ENTRY_END

; Allow validation resuming for the RRSIGs
STEP 2 TIME_PASSES ELAPSE 0.05

; recursion happens here.
STEP 10 CHECK_ANSWER
ENTRY_BEGIN
Expand Down
3 changes: 3 additions & 0 deletions testdata/val_any_dname.rpl
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ SECTION QUESTION
example.com. IN ANY
ENTRY_END

; Allow validation resuming for the RRSIGs
STEP 2 TIME_PASSES ELAPSE 0.05

; recursion happens here.
STEP 10 CHECK_ANSWER
ENTRY_BEGIN
Expand Down
3 changes: 3 additions & 0 deletions testdata/val_any_negcache.rpl
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ SECTION QUESTION
example.com. IN ANY
ENTRY_END

; Allow validation resuming for the RRSIGs
STEP 21 TIME_PASSES ELAPSE 0.05

; recursion happens here.
STEP 30 CHECK_ANSWER
ENTRY_BEGIN
Expand Down
3 changes: 3 additions & 0 deletions testdata/val_nx_nsec3_collision.rpl
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ SECTION QUESTION
www.example.com. IN A
ENTRY_END

; Allow validation resuming for NSEC3 hash calculations
STEP 2 TIME_PASSES ELAPSE 0.05

; recursion happens here.
STEP 10 CHECK_ANSWER
ENTRY_BEGIN
Expand Down
1 change: 1 addition & 0 deletions util/fptr_wlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ fptr_whitelist_comm_timer(void (*fptr)(void*))
else if(fptr == &pending_udp_timer_delay_cb) return 1;
else if(fptr == &worker_stat_timer_cb) return 1;
else if(fptr == &worker_probe_timer_cb) return 1;
else if(fptr == &validate_suspend_timer_cb) return 1;
#ifdef UB_ON_WINDOWS
else if(fptr == &wsvc_cron_cb) return 1;
#endif
Expand Down
3 changes: 2 additions & 1 deletion validator/val_nsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,15 @@ nsec_verify_rrset(struct module_env* env, struct val_env* ve,
{
struct packed_rrset_data* d = (struct packed_rrset_data*)
nsec->entry.data;
int verified = 0;
if(!d) return 0;
if(d->security == sec_status_secure)
return 1;
rrset_check_sec_status(env->rrset_cache, nsec, *env->now);
if(d->security == sec_status_secure)
return 1;
d->security = val_verify_rrset_entry(env, ve, nsec, kkey, reason,
reason_bogus, LDNS_SECTION_AUTHORITY, qstate);
reason_bogus, LDNS_SECTION_AUTHORITY, qstate, &verified);
if(d->security == sec_status_secure) {
rrset_update_sec_status(env->rrset_cache, nsec, *env->now);
return 1;
Expand Down
Loading

0 comments on commit b78aef7

Please sign in to comment.