Skip to content

Commit be771a7

Browse files
committed
unbound: Vendor import 1.23.0
Release notes at https://nlnetlabs.nl/news/2025/Apr/24/unbound-1.23.0-released/ MFC after: 2 weeks Merge commit '44bab727dfe28451b777dc9e47db4f748b709182'
2 parents 6014596 + 44bab72 commit be771a7

File tree

222 files changed

+41990
-7275
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+41990
-7275
lines changed

contrib/unbound/Makefile.in

+16-7
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,11 @@ testcode/unitlruhash.c testcode/unitmain.c testcode/unitmsgparse.c \
179179
testcode/unitneg.c testcode/unitregional.c testcode/unitslabhash.c \
180180
testcode/unitverify.c testcode/readhex.c testcode/testpkts.c testcode/unitldns.c \
181181
testcode/unitecs.c testcode/unitauth.c testcode/unitzonemd.c \
182-
testcode/unittcpreuse.c testcode/unitdoq.c
182+
testcode/unittcpreuse.c testcode/unitdoq.c testcode/unitinfra.c
183183
UNITTEST_OBJ=unitanchor.lo unitdname.lo unitlruhash.lo unitmain.lo \
184184
unitmsgparse.lo unitneg.lo unitregional.lo unitslabhash.lo unitverify.lo \
185185
readhex.lo testpkts.lo unitldns.lo unitecs.lo unitauth.lo unitzonemd.lo \
186-
unittcpreuse.lo unitdoq.lo
186+
unittcpreuse.lo unitdoq.lo unitinfra.lo
187187
UNITTEST_OBJ_LINK=$(UNITTEST_OBJ) worker_cb.lo $(COMMON_OBJ) $(SLDNS_OBJ) \
188188
$(COMPAT_OBJ)
189189
DAEMON_SRC=daemon/acl_list.c daemon/cachedump.c daemon/daemon.c \
@@ -509,10 +509,15 @@ util/configlexer.c: $(srcdir)/util/configlexer.lex util/configparser.h
509509
fi
510510
@if test ! -f $@; then echo "No $@ : need flex and bison to compile from source repository"; exit 1; fi
511511

512-
util/configparser.c util/configparser.h: $(srcdir)/util/configparser.y
512+
# Builds both util/configparser.c and util/configparser.h.
513+
# To avoid double-building we split one target out.
514+
util/configparser.c: $(srcdir)/util/configparser.y
513515
@-if test ! -d util; then $(INSTALL) -d util; fi
514516
$(YACC) -d -o util/configparser.c $(srcdir)/util/configparser.y
515517

518+
util/configparser.h: util/configparser.c
519+
touch $@
520+
516521
clean:
517522
rm -f *.o *.d *.lo *~ tags
518523
rm -f unbound$(EXEEXT) unbound-checkconf$(EXEEXT) unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup libunbound.la unbound.h
@@ -876,7 +881,7 @@ view.lo view.o: $(srcdir)/services/view.c config.h $(srcdir)/services/view.h $(s
876881
$(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/services/localzone.h $(srcdir)/util/storage/dnstree.h \
877882
$(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/msgreply.h \
878883
$(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \
879-
$(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/config_file.h
884+
$(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/config_file.h $(srcdir)/respip/respip.h
880885
rpz.lo rpz.o: $(srcdir)/services/rpz.c config.h $(srcdir)/services/rpz.h $(srcdir)/services/localzone.h \
881886
$(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/dnstree.h \
882887
$(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/msgreply.h \
@@ -972,7 +977,7 @@ fptr_wlist.lo fptr_wlist.o: $(srcdir)/util/fptr_wlist.c config.h $(srcdir)/util/
972977
$(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_kentry.h \
973978
$(srcdir)/validator/val_neg.h $(srcdir)/validator/autotrust.h $(srcdir)/libunbound/libworker.h \
974979
$(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h $(srcdir)/libunbound/unbound-event.h \
975-
$(srcdir)/libunbound/worker.h
980+
$(srcdir)/libunbound/worker.h $(srcdir)/daemon/remote.h
976981
locks.lo locks.o: $(srcdir)/util/locks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h
977982
log.lo log.o: $(srcdir)/util/log.c config.h $(srcdir)/util/log.h $(srcdir)/util/locks.h $(srcdir)/sldns/sbuffer.h
978983
mini_event.lo mini_event.o: $(srcdir)/util/mini_event.c config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \
@@ -1059,7 +1064,7 @@ tube.lo tube.o: $(srcdir)/util/tube.c config.h $(srcdir)/util/tube.h $(srcdir)/u
10591064
$(srcdir)/libunbound/unbound.h $(srcdir)/respip/respip.h $(srcdir)/util/ub_event.h
10601065
ub_event.lo ub_event.o: $(srcdir)/util/ub_event.c config.h $(srcdir)/util/ub_event.h $(srcdir)/util/log.h \
10611066
$(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \
1062-
$(srcdir)/util/tube.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h
1067+
$(srcdir)/util/tube.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h $(srcdir)/daemon/remote.h
10631068
ub_event_pluggable.lo ub_event_pluggable.o: $(srcdir)/util/ub_event_pluggable.c config.h $(srcdir)/util/ub_event.h \
10641069
$(srcdir)/libunbound/unbound-event.h $(srcdir)/util/netevent.h $(srcdir)/dnscrypt/dnscrypt.h \
10651070
$(srcdir)/util/log.h $(srcdir)/util/fptr_wlist.h \
@@ -1256,6 +1261,7 @@ unitzonemd.lo unitzonemd.o: $(srcdir)/testcode/unitzonemd.c config.h $(srcdir)/u
12561261
$(srcdir)/validator/val_anchor.h
12571262
unittcpreuse.lo unittcpreuse.o: $(srcdir)/testcode/unittcpreuse.c config.h $(srcdir)/services/outside_network.h \
12581263
$(srcdir)/util/random.h
1264+
unitinfra.lo unitinfra.o: $(srcdir)/testcode/unitinfra.c config.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/iterator/iterator.h
12591265
acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h $(srcdir)/daemon/acl_list.h \
12601266
$(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/services/view.h $(srcdir)/util/locks.h \
12611267
$(srcdir)/util/log.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h \
@@ -1307,7 +1313,10 @@ remote.lo remote.o: $(srcdir)/daemon/remote.c config.h $(srcdir)/daemon/remote.h
13071313
$(srcdir)/validator/val_anchor.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \
13081314
$(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/iterator/iter_delegpt.h \
13091315
$(srcdir)/services/outside_network.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/parseutil.h \
1310-
$(srcdir)/sldns/wire2str.h $(srcdir)/util/edns.h
1316+
$(srcdir)/sldns/wire2str.h $(srcdir)/util/edns.h \
1317+
$(srcdir)/util/locks.h $(srcdir)/util/ub_event.h \
1318+
$(srcdir)/util/tcp_conn_limit.h $(srcdir)/util/edns.h $(srcdir)/validator/val_neg.h \
1319+
$(srcdir)/iterator/iter_utils.h $(srcdir)/iterator/iter_donotq.h $(srcdir)/iterator/iter_priv.h
13111320
stats.lo stats.o: $(srcdir)/daemon/stats.c config.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \
13121321
$(srcdir)/libunbound/unbound.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \
13131322
$(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \
+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# ===========================================================================
2+
# https://www.gnu.org/software/autoconf-archive/ax_build_date_epoch.html
3+
# ===========================================================================
4+
#
5+
# SYNOPSIS
6+
#
7+
# AX_BUILD_DATE_EPOCH(VARIABLE[, FORMAT[, ACTION-IF-FAIL]])
8+
#
9+
# DESCRIPTION
10+
#
11+
# Sets VARIABLE to a string representing the current time. It is
12+
# formatted according to FORMAT if specified, otherwise it is formatted as
13+
# the number of seconds (excluding leap seconds) since the UNIX epoch (01
14+
# Jan 1970 00:00:00 UTC).
15+
#
16+
# If the SOURCE_DATE_EPOCH environment variable is set, it uses the value
17+
# of that variable instead of the current time. See
18+
# https://reproducible-builds.org/specs/source-date-epoch). If
19+
# SOURCE_DATE_EPOCH is set but cannot be properly interpreted as a UNIX
20+
# timestamp, then execute ACTION-IF-FAIL if specified, otherwise error.
21+
#
22+
# VARIABLE is AC_SUBST-ed.
23+
#
24+
# LICENSE
25+
#
26+
# Copyright (c) 2016 Eric Bavier <[email protected]>
27+
#
28+
# This program is free software: you can redistribute it and/or modify it
29+
# under the terms of the GNU General Public License as published by the
30+
# Free Software Foundation, either version 3 of the License, or (at your
31+
# option) any later version.
32+
#
33+
# This program is distributed in the hope that it will be useful, but
34+
# WITHOUT ANY WARRANTY; without even the implied warranty of
35+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
36+
# Public License for more details.
37+
#
38+
# You should have received a copy of the GNU General Public License along
39+
# with this program. If not, see <https://www.gnu.org/licenses/>.
40+
#
41+
# As a special exception, the respective Autoconf Macro's copyright owner
42+
# gives unlimited permission to copy, distribute and modify the configure
43+
# scripts that are the output of Autoconf when processing the Macro. You
44+
# need not follow the terms of the GNU General Public License when using
45+
# or distributing such scripts, even though portions of the text of the
46+
# Macro appear in them. The GNU General Public License (GPL) does govern
47+
# all other use of the material that constitutes the Autoconf Macro.
48+
#
49+
# This special exception to the GPL applies to versions of the Autoconf
50+
# Macro released by the Autoconf Archive. When you make and distribute a
51+
# modified version of the Autoconf Macro, you may extend this special
52+
# exception to the GPL to apply to your modified version as well.
53+
54+
#serial 2
55+
56+
AC_DEFUN([AX_BUILD_DATE_EPOCH],
57+
[dnl
58+
AC_MSG_CHECKING([for build time])
59+
ax_date_fmt="m4_default($2,%s)"
60+
AS_IF([test x"$SOURCE_DATE_EPOCH" = x],
61+
[$1=`date "+$ax_date_fmt"`],
62+
[ax_build_date=`date -u -d "@$SOURCE_DATE_EPOCH" "+$ax_date_fmt" 2>/dev/null \
63+
|| date -u -r "$SOURCE_DATE_EPOCH" "+$ax_date_fmt" 2>/dev/null`
64+
AS_IF([test x"$ax_build_date" = x],
65+
[m4_ifval([$3],
66+
[$3],
67+
[AC_MSG_ERROR([malformed SOURCE_DATE_EPOCH])])],
68+
[$1=$ax_build_date])])
69+
AC_MSG_RESULT([$$1])
70+
])dnl AX_BUILD_DATE_EPOCH

contrib/unbound/cachedb/cachedb.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#include "util/regional.h"
4848
#include "util/net_help.h"
4949
#include "util/config_file.h"
50+
#include "util/data/dname.h"
5051
#include "util/data/msgreply.h"
5152
#include "util/data/msgencode.h"
5253
#include "services/cache/dns.h"
@@ -341,6 +342,7 @@ calc_hash(struct query_info* qinfo, struct module_env* env, char* buf,
341342
/* copy the hash info into the clear buffer */
342343
if(clen + qinfo->qname_len < sizeof(clear)) {
343344
memmove(clear+clen, qinfo->qname, qinfo->qname_len);
345+
query_dname_tolower(clear+clen);
344346
clen += qinfo->qname_len;
345347
}
346348
if(clen + 4 < sizeof(clear)) {
@@ -755,7 +757,8 @@ cachedb_intcache_store(struct module_qstate* qstate, int msg_expired)
755757
}
756758
(void)dns_cache_store(qstate->env, &qstate->qinfo,
757759
qstate->return_msg->rep, 0, qstate->prefetch_leeway, 0,
758-
qstate->region, store_flags, qstate->qstarttime);
760+
qstate->region, store_flags, qstate->qstarttime,
761+
qstate->is_valrec);
759762
if(serve_expired && msg_expired) {
760763
if(qstate->env->cfg->serve_expired_client_timeout) {
761764
/* No expired response from the query state, the

0 commit comments

Comments
 (0)