Skip to content

Commit 3857248

Browse files
committed
Merge remote-tracking branch 'nlnet/master'
* nlnet/master: (66 commits) - Tag for release 1.21.0, the repository continues with 1.21.1 in development. - Fix spelling for the cache-min-negative-ttl entry in the example.conf. - Fix that for windows the module startup is called and sets up the module-config. - Set version number to 1.21.0 for release. - Fix CacheFlush issues with limit on NS RRs. Thanks to Yehuda Afek, Anat Bremler-Barr, Shoham Danino and Yuval Shavitt (Tel-Aviv University and Reichman University). - Fix CAMP issues with global quota. Thanks to Huayi Duan, Marco Bearzi, Jodok Vieli, and Cagin Tanir from NetSec group, ETH Zurich. - Fix that alloc stats for forwards and hints are printed, and when alloc stats is enabled, the unit test for unbound control waits for reloads to complete. Changelog note for NLnetLabs#1090 - Merge NLnetLabs#1090: Cookie secret file. Adds `cookie-secret-file: "unbound_cookiesecrets.txt"` option to store cookie secrets for EDNS COOKIE secret rollover. The remote control add_cookie_secret, activate_cookie_secret and drop_cookie_secret commands can be used for rollover, the command print_cookie_secrets shows the values in use. Cookie secret file (NLnetLabs#1090) Update changelog. - Fix testbound for alloc stats strdup in util/alloc.c. - Fix testbound for alloc stats strdup in util/alloc.c. - Fix that alloc stats has strdup checks, it stops debuggers from complaining about mismatch at free time. - Fix that the worker mem report with alloc stats does not attempt to print memory use of forwards and hints if they have been deleted already. - Fix dnstap test program, cleans up to have clean memory on exit, for tap_data_free, does not delete NULL items. Also it does not try to free the tail, specifically in the free of the list since that picked up the next item in the list for its loop causing invalid free. Added internal unit test to unbound-dnstap-socket for that. - Fix for NLnetLabs#1114: Fix that cache fill for forward-host names is performed, so that with nonzero target-fetch-policy it fetches forwarder addresses and uses them from cache. Also updated that delegation point cache fill routines use CDflag for AAAA message lookups, so that its negative lookup stops a recursion since the cache uses the bit for disambiguation for dns64 but the recursion uses CDflag for the AAAA target lookups, so the check correctly stops a useless recursion by its cache lookup. - Fix to document parameters of auth_zone_verify_zonemd_with_key. - Add root key 38696 from 2024 for DNSSEC validation. It is added to the default root keys in unbound-anchor. The content can be inspected with `unbound-anchor -l`. - For NLnetLabs#935 and NLnetLabs#1104, clarify RPZ order and semantics. - Cleanup ede.tdir test. - Fix link of unbound-dnstap-socket without openssl. ...
2 parents 3eec25f + 5fa84d5 commit 3857248

File tree

107 files changed

+3348
-457
lines changed

Some content is hidden

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

107 files changed

+3348
-457
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
/config.status
1111
/dnstap/dnstap_config.h
1212
/dnscrypt/dnscrypt_config.h
13+
/util/configlexer.c
14+
/util/configparser.c
15+
/util/configparser.h
1316
/clubsyms.def
1417
/doc/example.conf
1518
/doc/libunbound.3
@@ -55,6 +58,7 @@
5558
/pythonmod/unboundmodule.py
5659
/testdata/result.*
5760
/testdata/.done-*
61+
/testdata/.skip-*
5862
/testdata/.perfstats.txt
5963
/doc/html
6064
/doc/xml

Makefile.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,8 @@ unbound-control-setup: smallapp/unbound-control-setup.sh
439439
dnstap.lo dnstap.o: $(srcdir)/dnstap/dnstap.c config.h dnstap/dnstap_config.h \
440440
dnstap/dnstap.pb-c.c dnstap/dnstap.pb-c.h $(srcdir)/dnstap/dnstap.h \
441441
$(srcdir)/util/config_file.h $(srcdir)/util/log.h \
442-
$(srcdir)/util/netevent.h $(srcdir)/util/net_help.h
442+
$(srcdir)/util/netevent.h $(srcdir)/util/net_help.h \
443+
$(srcdir)/util/locks.h
443444

444445
dnstap/dnstap.pb-c.c dnstap/dnstap.pb-c.h: $(srcdir)/dnstap/dnstap.proto
445446
@-if test ! -d dnstap; then $(INSTALL) -d dnstap; fi
@@ -1297,7 +1298,7 @@ remote.lo remote.o: $(srcdir)/daemon/remote.c config.h $(srcdir)/daemon/remote.h
12971298
$(srcdir)/validator/val_anchor.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \
12981299
$(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/iterator/iter_delegpt.h \
12991300
$(srcdir)/services/outside_network.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/parseutil.h \
1300-
$(srcdir)/sldns/wire2str.h
1301+
$(srcdir)/sldns/wire2str.h $(srcdir)/util/edns.h
13011302
stats.lo stats.o: $(srcdir)/daemon/stats.c config.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \
13021303
$(srcdir)/libunbound/unbound.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \
13031304
$(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \

cachedb/cachedb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ cachedb_get_mem(struct module_env* env, int id)
983983
*/
984984
static struct module_func_block cachedb_block = {
985985
"cachedb",
986-
&cachedb_init, &cachedb_deinit, &cachedb_operate,
986+
NULL, NULL, &cachedb_init, &cachedb_deinit, &cachedb_operate,
987987
&cachedb_inform_super, &cachedb_clear, &cachedb_get_mem
988988
};
989989

config.h.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
/* config.h.in. Generated from configure.ac by autoheader. */
22

3+
/* apply the fallthrough attribute. */
4+
#undef ATTR_FALLTHROUGH
5+
36
/* apply the noreturn attribute to a function that exits the program */
47
#undef ATTR_NORETURN
58

@@ -57,6 +60,9 @@
5760
/* Define to 1 if you have the <arpa/inet.h> header file. */
5861
#undef HAVE_ARPA_INET_H
5962

63+
/* Whether the C compiler accepts the "fallthrough" attribute */
64+
#undef HAVE_ATTR_FALLTHROUGH
65+
6066
/* Whether the C compiler accepts the "format" attribute */
6167
#undef HAVE_ATTR_FORMAT
6268

@@ -406,6 +412,9 @@
406412
/* Define to 1 if you have the <net/if.h> header file. */
407413
#undef HAVE_NET_IF_H
408414

415+
/* Define to 1 if you have the <net/pfvar.h> header file. */
416+
#undef HAVE_NET_PFVAR_H
417+
409418
/* Define this to use nghttp2 client. */
410419
#undef HAVE_NGHTTP2
411420

@@ -1487,6 +1496,7 @@ struct sockaddr_storage;
14871496
# define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)
14881497
# define free(p) unbound_stat_free_log(p, __FILE__, __LINE__, __func__)
14891498
# define realloc(p,s) unbound_stat_realloc_log(p, s, __FILE__, __LINE__, __func__)
1499+
# define strdup(s) unbound_stat_strdup_log(s, __FILE__, __LINE__, __func__)
14901500
void *unbound_stat_malloc(size_t size);
14911501
void *unbound_stat_calloc(size_t nmemb, size_t size);
14921502
void unbound_stat_free(void *ptr);
@@ -1499,6 +1509,8 @@ void unbound_stat_free_log(void *ptr, const char* file, int line,
14991509
const char* func);
15001510
void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file,
15011511
int line, const char* func);
1512+
char *unbound_stat_strdup_log(const char *s, const char* file, int line,
1513+
const char* func);
15021514
#elif defined(UNBOUND_ALLOC_LITE)
15031515
# include "util/alloc.h"
15041516
#endif /* UNBOUND_ALLOC_LITE and UNBOUND_ALLOC_STATS */

configure

Lines changed: 119 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.71 for unbound 1.20.1.
3+
# Generated by GNU Autoconf 2.71 for unbound 1.21.1.
44
#
55
# Report bugs to <unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues>.
66
#
@@ -622,8 +622,8 @@ MAKEFLAGS=
622622
# Identity of this package.
623623
PACKAGE_NAME='unbound'
624624
PACKAGE_TARNAME='unbound'
625-
PACKAGE_VERSION='1.20.1'
626-
PACKAGE_STRING='unbound 1.20.1'
625+
PACKAGE_VERSION='1.21.1'
626+
PACKAGE_STRING='unbound 1.21.1'
627627
PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues'
628628
PACKAGE_URL=''
629629

@@ -1508,7 +1508,7 @@ if test "$ac_init_help" = "long"; then
15081508
# Omit some internal or obsolete options to make the list less imposing.
15091509
# This message is too long to be a string in the A/UX 3.1 sh.
15101510
cat <<_ACEOF
1511-
\`configure' configures unbound 1.20.1 to adapt to many kinds of systems.
1511+
\`configure' configures unbound 1.21.1 to adapt to many kinds of systems.
15121512

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

@@ -1574,7 +1574,7 @@ fi
15741574

15751575
if test -n "$ac_init_help"; then
15761576
case $ac_init_help in
1577-
short | recursive ) echo "Configuration of unbound 1.20.1:";;
1577+
short | recursive ) echo "Configuration of unbound 1.21.1:";;
15781578
esac
15791579
cat <<\_ACEOF
15801580

@@ -1822,7 +1822,7 @@ fi
18221822
test -n "$ac_init_help" && exit $ac_status
18231823
if $ac_init_version; then
18241824
cat <<\_ACEOF
1825-
unbound configure 1.20.1
1825+
unbound configure 1.21.1
18261826
generated by GNU Autoconf 2.71
18271827

18281828
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2479,7 +2479,7 @@ cat >config.log <<_ACEOF
24792479
This file contains any messages produced by compilers while
24802480
running configure, to aid debugging if configure makes a mistake.
24812481

2482-
It was created by unbound $as_me 1.20.1, which was
2482+
It was created by unbound $as_me 1.21.1, which was
24832483
generated by GNU Autoconf 2.71. Invocation command line was
24842484

24852485
$ $0$ac_configure_args_raw
@@ -3241,13 +3241,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
32413241

32423242
UNBOUND_VERSION_MAJOR=1
32433243

3244-
UNBOUND_VERSION_MINOR=20
3244+
UNBOUND_VERSION_MINOR=21
32453245

32463246
UNBOUND_VERSION_MICRO=1
32473247

32483248

32493249
LIBUNBOUND_CURRENT=9
3250-
LIBUNBOUND_REVISION=28
3250+
LIBUNBOUND_REVISION=29
32513251
LIBUNBOUND_AGE=1
32523252
# 1.0.0 had 0:12:0
32533253
# 1.0.1 had 0:13:0
@@ -3342,7 +3342,8 @@ LIBUNBOUND_AGE=1
33423342
# 1.19.2 had 9:25:1
33433343
# 1.19.3 had 9:26:1
33443344
# 1.20.0 had 9:27:1
3345-
# 1.20.1 had 9:28:1
3345+
# 1.21.0 had 9:28:1
3346+
# 1.21.1 had 9:29:1
33463347

33473348
# Current -- the number of the binary API that we're implementing
33483349
# Revision -- which iteration of the implementation of the binary
@@ -6976,6 +6977,10 @@ printf "%s\n" "#define HAVE_ATTR_WEAK 1" >>confdefs.h
69766977

69776978
printf "%s\n" "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h
69786979

6980+
else
6981+
6982+
printf "%s\n" "#define ATTR_WEAK /**/" >>confdefs.h
6983+
69796984
fi
69806985

69816986

@@ -7023,6 +7028,79 @@ printf "%s\n" "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
70237028

70247029
printf "%s\n" "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
70257030

7031+
else
7032+
7033+
printf "%s\n" "#define ATTR_NORETURN /**/" >>confdefs.h
7034+
7035+
fi
7036+
7037+
7038+
7039+
7040+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"fallthrough\" attribute" >&5
7041+
printf %s "checking whether the C compiler (${CC-cc}) accepts the \"fallthrough\" attribute... " >&6; }
7042+
BAKCFLAGS="$CFLAGS"
7043+
CFLAGS="$CFLAGS -Werror"
7044+
if test ${ac_cv_c_fallthrough_attribute+y}
7045+
then :
7046+
printf %s "(cached) " >&6
7047+
else $as_nop
7048+
ac_cv_c_fallthrough_attribute=no
7049+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7050+
/* end confdefs.h. */
7051+
#include <stdio.h>
7052+
void f(int x) {
7053+
int y = 0;
7054+
switch(x) {
7055+
case 1:
7056+
y = 1;
7057+
__attribute__((fallthrough));
7058+
/* fallthrough */
7059+
case 2:
7060+
y++;
7061+
break;
7062+
case 3:
7063+
y = 3;
7064+
break;
7065+
}
7066+
printf("%d", y);
7067+
}
7068+
7069+
int
7070+
main (void)
7071+
{
7072+
7073+
f(1);
7074+
7075+
;
7076+
return 0;
7077+
}
7078+
_ACEOF
7079+
if ac_fn_c_try_compile "$LINENO"
7080+
then :
7081+
ac_cv_c_fallthrough_attribute="yes"
7082+
else $as_nop
7083+
ac_cv_c_fallthrough_attribute="no"
7084+
fi
7085+
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7086+
7087+
fi
7088+
7089+
CFLAGS="$BAKCFLAGS"
7090+
7091+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_fallthrough_attribute" >&5
7092+
printf "%s\n" "$ac_cv_c_fallthrough_attribute" >&6; }
7093+
if test $ac_cv_c_fallthrough_attribute = yes; then
7094+
7095+
printf "%s\n" "#define HAVE_ATTR_FALLTHROUGH 1" >>confdefs.h
7096+
7097+
7098+
printf "%s\n" "#define ATTR_FALLTHROUGH __attribute__((fallthrough));" >>confdefs.h
7099+
7100+
else
7101+
7102+
printf "%s\n" "#define ATTR_FALLTHROUGH /**/" >>confdefs.h
7103+
70267104
fi
70277105

70287106

@@ -24317,7 +24395,21 @@ printf "%s\n" "#define USE_IPSET 1" >>confdefs.h
2431724395
IPSET_OBJ="ipset.lo"
2431824396

2431924397

24320-
# mnl
24398+
# BSD's pf
24399+
for ac_header in net/pfvar.h
24400+
do :
24401+
ac_fn_c_check_header_compile "$LINENO" "net/pfvar.h" "ac_cv_header_net_pfvar_h" "
24402+
#include <netinet/in.h>
24403+
#include <net/if.h>
24404+
24405+
"
24406+
if test "x$ac_cv_header_net_pfvar_h" = xyes
24407+
then :
24408+
printf "%s\n" "#define HAVE_NET_PFVAR_H 1" >>confdefs.h
24409+
24410+
else $as_nop
24411+
24412+
# mnl
2432124413

2432224414
# Check whether --with-libmnl was given.
2432324415
if test ${with_libmnl+y}
@@ -24327,13 +24419,13 @@ else $as_nop
2432724419
withval="yes"
2432824420
fi
2432924421

24330-
found_libmnl="no"
24331-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5
24422+
found_libmnl="no"
24423+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5
2433224424
printf %s "checking for libmnl... " >&6; }
24333-
if test x_$withval = x_ -o x_$withval = x_yes; then
24425+
if test x_$withval = x_ -o x_$withval = x_yes; then
2433424426
withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
24335-
fi
24336-
for dir in $withval ; do
24427+
fi
24428+
for dir in $withval ; do
2433724429
if test -f "$dir/include/libmnl/libmnl.h" -o -f "$dir/include/libmnl/libmnl/libmnl.h"; then
2433824430
found_libmnl="yes"
2433924431
extralibmnl=""
@@ -24351,10 +24443,14 @@ printf "%s\n" "found in $dir" >&6; }
2435124443
LIBS="$LIBS -lmnl"
2435224444
break;
2435324445
fi
24354-
done
24355-
if test x_$found_libmnl != x_yes; then
24356-
as_fn_error $? "Could not find libmnl, libmnl.h" "$LINENO" 5
24357-
fi
24446+
done
24447+
if test x_$found_libmnl != x_yes; then
24448+
as_fn_error $? "Could not find libmnl, libmnl.h" "$LINENO" 5
24449+
fi
24450+
24451+
fi
24452+
24453+
done
2435824454
;;
2435924455
no|*)
2436024456
# nothing
@@ -24549,7 +24645,7 @@ printf "%s\n" "#define MAXSYSLOGMSGLEN 10240" >>confdefs.h
2454924645

2455024646

2455124647

24552-
version=1.20.1
24648+
version=1.21.1
2455324649

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

@@ -25061,7 +25157,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2506125157
# report actual input values of CONFIG_FILES etc. instead of their
2506225158
# values after options handling.
2506325159
ac_log="
25064-
This file was extended by unbound $as_me 1.20.1, which was
25160+
This file was extended by unbound $as_me 1.21.1, which was
2506525161
generated by GNU Autoconf 2.71. Invocation command line was
2506625162

2506725163
CONFIG_FILES = $CONFIG_FILES
@@ -25129,7 +25225,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
2512925225
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2513025226
ac_cs_config='$ac_cs_config_escaped'
2513125227
ac_cs_version="\\
25132-
unbound config.status 1.20.1
25228+
unbound config.status 1.21.1
2513325229
configured by $0, generated by GNU Autoconf 2.71,
2513425230
with options \\"\$ac_cs_config\\"
2513525231

0 commit comments

Comments
 (0)