From 78c70a988a43b0aa306b5dd63e40cbb251225a86 Mon Sep 17 00:00:00 2001 From: Felipe Gasper Date: Mon, 17 Oct 2022 14:09:50 -0400 Subject: [PATCH 01/64] Remove unused variable. --- wire2host.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/wire2host.c b/wire2host.c index 63b67a0d..91d3f136 100644 --- a/wire2host.c +++ b/wire2host.c @@ -59,7 +59,6 @@ ldns_wire2dname(ldns_rdf **dname, const uint8_t *wire, size_t max, size_t *pos) uint16_t pointer_target; uint8_t pointer_target_buf[2]; size_t dname_pos = 0; - size_t uncompressed_length = 0; size_t compression_pos = 0; uint8_t tmp_dname[LDNS_MAX_DOMAINLEN]; unsigned int pointer_count = 0; @@ -120,7 +119,6 @@ ldns_wire2dname(ldns_rdf **dname, const uint8_t *wire, size_t max, size_t *pos) return LDNS_STATUS_DOMAINNAME_OVERFLOW; } memcpy(&tmp_dname[dname_pos], &wire[*pos], label_size); - uncompressed_length += label_size + 1; dname_pos += label_size; *pos = *pos + label_size; From 2f9c9a53e441a4d81a417325d34073c8f64a074d Mon Sep 17 00:00:00 2001 From: Felipe Gasper Date: Mon, 17 Oct 2022 22:15:29 -0400 Subject: [PATCH 02/64] 16-unit-tests-edns: Fix leak & warnings This addresses a couple issues found via https://github.com/NLnetLabs/ldns/pull/186. --- test/16-unit-tests-edns.tpkg/16-unit-tests-edns.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/16-unit-tests-edns.tpkg/16-unit-tests-edns.c b/test/16-unit-tests-edns.tpkg/16-unit-tests-edns.c index 1607df0b..aaa90317 100644 --- a/test/16-unit-tests-edns.tpkg/16-unit-tests-edns.c +++ b/test/16-unit-tests-edns.tpkg/16-unit-tests-edns.c @@ -34,10 +34,12 @@ check_option_entries(ldns_edns_option *edns, ldns_edns_option_code code, buf = ldns_edns_get_wireformat_buffer(edns); if (ldns_buffer_read_u16(buf) != code) { + ldns_buffer_free(buf); printf("Error: EDNS type is incorrect\n"); return 0; } if (ldns_buffer_read_u16(buf) != size) { + ldns_buffer_free(buf); printf("Error: EDNS length is incorrect\n"); return 0; } @@ -46,15 +48,17 @@ check_option_entries(ldns_edns_option *edns, ldns_edns_option_code code, if (ldns_buffer_read_u8_at(buf, i+4) != hex_data[i]) { printf("Error: EDNS data is incorrect: %d, %d\n", ldns_buffer_read_u8_at(buf, i+4), hex_data[i]); + ldns_buffer_free(buf); return 0; } } + ldns_buffer_free(buf); return 1; } static int -check_option() +check_option(void) { ldns_edns_option *edns; ldns_edns_option *clone; @@ -119,7 +123,7 @@ static int check_option_list_entries(ldns_edns_option_list *list, } static int -check_option_list() +check_option_list(void) { size_t size, i; ldns_edns_option_list* list; From b1d63de17b0e2339cb1c57399b70bdb9100e0018 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 6 Nov 2022 08:01:49 +0000 Subject: [PATCH 03/64] Makefile.in: build config.h before any object Object files lack dependency on `config.h` symlink (and usually depend only on `ldns/config.h`). As a result build occasionally fails in `make --shuffe mode`: $ make --shuffle ... ./libtool --tag=CC --quiet --mode=compile gcc -I. -I. \ -DHAVE_CONFIG_H -DLDNS_TRUST_ANCHOR_FILE="\"...-dns-root-data-2019-01-11/root.key\"" \ -DOPENSSL_API_COMPAT=10100 -fno-strict-aliasing -Wunused-function -Wstrict-prototypes \ -Wwrite-strings -W -Wall -g -O2 -I...-openssl-3.0.7-dev/include -c examples/ldns-rrsig.c \ -o examples/ldns-rrsig.o examples/ldns-rrsig.c:10:10: fatal error: config.h: No such file or directory 10 | #include "config.h" | ^~~~~~~~~~ The change moves `config.h` symlink creation in `setup-builddir` from a dependency on final binary to dependency on all individual objects. While at it regenerated dependencies with `make depend`. before the change `make --shuffle` build was failing in about 50% cases. After the change: `make --shuffle` succeeded 80 times in a row. --- Makefile.in | 182 ++++++++++++++++++++++++++-------------------------- 1 file changed, 92 insertions(+), 90 deletions(-) diff --git a/Makefile.in b/Makefile.in index 6cffefa7..aa6ebb32 100644 --- a/Makefile.in +++ b/Makefile.in @@ -125,7 +125,7 @@ LINK_EXE = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LIBSSL_LDFLAGS) .PHONY: install uninstall install-doc uninstall-doc uninstall-pyldns .PHONY: install-h uninstall-h install-lib uninstall-lib install-pyldns -all: setup-builddir lib linktest manpages @P5_DNS_LDNS@ @PYLDNS@ @DRILL@ @EXAMPLES@ +all: lib linktest manpages @P5_DNS_LDNS@ @PYLDNS@ @DRILL@ @EXAMPLES@ .SUFFIXES: .c .o .a .lo .h .i @@ -156,8 +156,9 @@ putdown-builddir: if test -d drill -a ! -f drill/README ; then rmdir drill || : ; fi if test -d compat -a ! -f compat/malloc.c; then rmdir compat || : ; fi rm -rf builddir/ + rm -f setup-builddir -drill: setup-builddir no-drill-config-h drill/drill drill/drill.1 +drill: no-drill-config-h drill/drill drill/drill.1 no-drill-config-h: @if test -e $(srcdir)/drill/config.h -o -e drill/config.h ; \ then echo "A config.h was detected in the drill subdirectory." ; \ @@ -188,7 +189,7 @@ uninstall-drill: clean-drill: $(LIBTOOL) --mode clean rm -f $(DRILL_LOBJS) drill/drill drill/drill.1 -examples: setup-builddir no-examples-config-h $(LIB) $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) examples/ldns-dane.1 examples/ldns-verify-zone.1 +examples: no-examples-config-h $(LIB) $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) examples/ldns-dane.1 examples/ldns-verify-zone.1 no-examples-config-h: @if test -e $(srcdir)/examples/config.h -o -e examples/config.h ; \ then echo "A config.h was detected in the examples subdirectory." ; \ @@ -320,7 +321,7 @@ pyldns: _ldns.la $(pywrapdir)/ldns_wrapper.c: $(PYLDNS_I_FILES) ldns/config.h $(swig) $(swigpy_flags) -o $@ $(PYTHON_CPPFLAGS) $(pywrapdir)/ldns.i -ldns_wrapper.lo: $(pywrapdir)/ldns_wrapper.c ldns/config.h +ldns_wrapper.lo: setup-builddir $(pywrapdir)/ldns_wrapper.c ldns/config.h $(COMP_LIB) -I./include/ldns $(LIBSSL_CPPFLAGS) $(PYTHON_CPPFLAGS) $(PYTHON_X_CFLAGS) -c $(pywrapdir)/ldns_wrapper.c -o $@ _ldns.la: ldns_wrapper.lo libldns.la @@ -543,6 +544,7 @@ DEPEND_TARGET2=$(srcdir)/Makefile.in # then, add srcdir before .c and .h in deps. # then, remove srcdir from the (generated) parser and lexer. # and mention the .lo +# and add setup-builddir dependency for all objects depend: if test ! -e config.h ; then ln -s ldns/config.h . ; fi echo "" > $(DEPEND_TMP) @@ -560,7 +562,7 @@ depend: -e 's?$$(srcdir)/ldns/common.h?ldns/common.h?g' \ -e 's?$$(srcdir)/ldns/util.h?ldns/util.h?g' \ -e 's?$$(srcdir)/ldns/net.h?ldns/net.h?g' \ - -e 's!\(.*\)\.o[ :]*!'"$$subdir/"'\1.lo '"$$subdir/"'\1.o: !g' \ + -e 's!\(.*\)\.o[ :]*!'"$$subdir/"'\1.lo '"$$subdir/"'\1.o: setup-builddir !g' \ -e 's?^\.\/??g' -e 's? \.\/? ?g' \ >> $(DEPEND_TMP) ;\ done; \ @@ -584,7 +586,7 @@ depend: # Dependencies -buffer.lo buffer.o: $(srcdir)/buffer.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ +buffer.lo buffer.o: setup-builddir $(srcdir)/buffer.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ @@ -592,7 +594,7 @@ buffer.lo buffer.o: $(srcdir)/buffer.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/ $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -dane.lo dane.o: $(srcdir)/dane.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ +dane.lo dane.o: setup-builddir $(srcdir)/dane.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ @@ -600,7 +602,7 @@ dane.lo dane.o: $(srcdir)/dane.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -dname.lo dname.o: $(srcdir)/dname.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ +dname.lo dname.o: setup-builddir $(srcdir)/dname.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ @@ -608,7 +610,7 @@ dname.lo dname.o: $(srcdir)/dname.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/uti $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -dnssec.lo dnssec.o: $(srcdir)/dnssec.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ +dnssec.lo dnssec.o: setup-builddir $(srcdir)/dnssec.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ @@ -616,7 +618,7 @@ dnssec.lo dnssec.o: $(srcdir)/dnssec.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/ $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -dnssec_sign.lo dnssec_sign.o: $(srcdir)/dnssec_sign.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +dnssec_sign.lo dnssec_sign.o: setup-builddir $(srcdir)/dnssec_sign.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -624,7 +626,7 @@ dnssec_sign.lo dnssec_sign.o: $(srcdir)/dnssec_sign.c ldns/config.h $(srcdir)/ld $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -dnssec_verify.lo dnssec_verify.o: $(srcdir)/dnssec_verify.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +dnssec_verify.lo dnssec_verify.o: setup-builddir $(srcdir)/dnssec_verify.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -632,7 +634,7 @@ dnssec_verify.lo dnssec_verify.o: $(srcdir)/dnssec_verify.c ldns/config.h $(srcd $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -dnssec_zone.lo dnssec_zone.o: $(srcdir)/dnssec_zone.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +dnssec_zone.lo dnssec_zone.o: setup-builddir $(srcdir)/dnssec_zone.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -640,8 +642,8 @@ dnssec_zone.lo dnssec_zone.o: $(srcdir)/dnssec_zone.c ldns/config.h $(srcdir)/ld $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -duration.lo duration.o: $(srcdir)/duration.c ldns/config.h $(srcdir)/ldns/duration.h -edns.lo edns.o: $(srcdir)/edns.c $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h \ +duration.lo duration.o: setup-builddir $(srcdir)/duration.c ldns/config.h $(srcdir)/ldns/duration.h +edns.lo edns.o: setup-builddir $(srcdir)/edns.c $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h \ $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h \ $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \ $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ @@ -649,7 +651,7 @@ edns.lo edns.o: $(srcdir)/edns.c $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -error.lo error.o: $(srcdir)/error.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ +error.lo error.o: setup-builddir $(srcdir)/error.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ @@ -657,7 +659,7 @@ error.lo error.o: $(srcdir)/error.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/uti $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -higher.lo higher.o: $(srcdir)/higher.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ +higher.lo higher.o: setup-builddir $(srcdir)/higher.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ @@ -665,7 +667,7 @@ higher.lo higher.o: $(srcdir)/higher.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/ $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -host2str.lo host2str.o: $(srcdir)/host2str.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +host2str.lo host2str.o: setup-builddir $(srcdir)/host2str.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -673,7 +675,7 @@ host2str.lo host2str.o: $(srcdir)/host2str.c ldns/config.h $(srcdir)/ldns/ldns.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -host2wire.lo host2wire.o: $(srcdir)/host2wire.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +host2wire.lo host2wire.o: setup-builddir $(srcdir)/host2wire.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -681,7 +683,7 @@ host2wire.lo host2wire.o: $(srcdir)/host2wire.c ldns/config.h $(srcdir)/ldns/ldn $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -keys.lo keys.o: $(srcdir)/keys.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ +keys.lo keys.o: setup-builddir $(srcdir)/keys.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ @@ -689,7 +691,7 @@ keys.lo keys.o: $(srcdir)/keys.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -linktest.lo linktest.o: $(srcdir)/linktest.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +linktest.lo linktest.o: setup-builddir $(srcdir)/linktest.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -697,7 +699,7 @@ linktest.lo linktest.o: $(srcdir)/linktest.c ldns/config.h $(srcdir)/ldns/ldns.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -net.lo net.o: $(srcdir)/net.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ +net.lo net.o: setup-builddir $(srcdir)/net.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ @@ -705,7 +707,7 @@ net.lo net.o: $(srcdir)/net.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ld $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -packet.lo packet.o: $(srcdir)/packet.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ +packet.lo packet.o: setup-builddir $(srcdir)/packet.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ @@ -713,7 +715,7 @@ packet.lo packet.o: $(srcdir)/packet.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/ $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -parse.lo parse.o: $(srcdir)/parse.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ +parse.lo parse.o: setup-builddir $(srcdir)/parse.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ @@ -721,10 +723,10 @@ parse.lo parse.o: $(srcdir)/parse.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/uti $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -radix.lo radix.o: $(srcdir)/radix.c ldns/config.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/error.h ldns/util.h \ +radix.lo radix.o: setup-builddir $(srcdir)/radix.c ldns/config.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/error.h ldns/util.h \ ldns/common.h -rbtree.lo rbtree.o: $(srcdir)/rbtree.c ldns/config.h $(srcdir)/ldns/rbtree.h ldns/util.h ldns/common.h -rdata.lo rdata.o: $(srcdir)/rdata.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ +rbtree.lo rbtree.o: setup-builddir $(srcdir)/rbtree.c ldns/config.h $(srcdir)/ldns/rbtree.h ldns/util.h ldns/common.h +rdata.lo rdata.o: setup-builddir $(srcdir)/rdata.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ @@ -732,7 +734,7 @@ rdata.lo rdata.o: $(srcdir)/rdata.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/uti $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -resolver.lo resolver.o: $(srcdir)/resolver.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +resolver.lo resolver.o: setup-builddir $(srcdir)/resolver.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -740,7 +742,7 @@ resolver.lo resolver.o: $(srcdir)/resolver.c ldns/config.h $(srcdir)/ldns/ldns.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -rr.lo rr.o: $(srcdir)/rr.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ +rr.lo rr.o: setup-builddir $(srcdir)/rr.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ @@ -748,7 +750,7 @@ rr.lo rr.o: $(srcdir)/rr.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/ $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -rr_functions.lo rr_functions.o: $(srcdir)/rr_functions.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +rr_functions.lo rr_functions.o: setup-builddir $(srcdir)/rr_functions.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -756,7 +758,7 @@ rr_functions.lo rr_functions.o: $(srcdir)/rr_functions.c ldns/config.h $(srcdir) $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -sha1.lo sha1.o: $(srcdir)/sha1.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ +sha1.lo sha1.o: setup-builddir $(srcdir)/sha1.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ @@ -764,8 +766,8 @@ sha1.lo sha1.o: $(srcdir)/sha1.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -sha2.lo sha2.o: $(srcdir)/sha2.c ldns/config.h $(srcdir)/ldns/sha2.h -str2host.lo str2host.o: $(srcdir)/str2host.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +sha2.lo sha2.o: setup-builddir $(srcdir)/sha2.c ldns/config.h $(srcdir)/ldns/sha2.h +str2host.lo str2host.o: setup-builddir $(srcdir)/str2host.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -773,7 +775,7 @@ str2host.lo str2host.o: $(srcdir)/str2host.c ldns/config.h $(srcdir)/ldns/ldns.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -tsig.lo tsig.o: $(srcdir)/tsig.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ +tsig.lo tsig.o: setup-builddir $(srcdir)/tsig.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ @@ -781,7 +783,7 @@ tsig.lo tsig.o: $(srcdir)/tsig.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -update.lo update.o: $(srcdir)/update.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ +update.lo update.o: setup-builddir $(srcdir)/update.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ @@ -789,9 +791,9 @@ update.lo update.o: $(srcdir)/update.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/ $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -util.lo util.o: $(srcdir)/util.c ldns/config.h $(srcdir)/ldns/rdata.h ldns/common.h $(srcdir)/ldns/error.h \ +util.lo util.o: setup-builddir $(srcdir)/util.c ldns/config.h $(srcdir)/ldns/rdata.h ldns/common.h $(srcdir)/ldns/error.h \ ldns/util.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/buffer.h -wire2host.lo wire2host.o: $(srcdir)/wire2host.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +wire2host.lo wire2host.o: setup-builddir $(srcdir)/wire2host.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -799,7 +801,7 @@ wire2host.lo wire2host.o: $(srcdir)/wire2host.c ldns/config.h $(srcdir)/ldns/ldn $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -zone.lo zone.o: $(srcdir)/zone.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ +zone.lo zone.o: setup-builddir $(srcdir)/zone.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ @@ -807,26 +809,26 @@ zone.lo zone.o: $(srcdir)/zone.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -compat/b64_ntop.lo compat/b64_ntop.o: $(srcdir)/compat/b64_ntop.c ldns/config.h -compat/b64_pton.lo compat/b64_pton.o: $(srcdir)/compat/b64_pton.c ldns/config.h -compat/calloc.lo compat/calloc.o: $(srcdir)/compat/calloc.c ldns/config.h -compat/ctime_r.lo compat/ctime_r.o: $(srcdir)/compat/ctime_r.c ldns/config.h -compat/fake-rfc2553.lo compat/fake-rfc2553.o: $(srcdir)/compat/fake-rfc2553.c ldns/config.h ldns/common.h \ +compat/b64_ntop.lo compat/b64_ntop.o: setup-builddir $(srcdir)/compat/b64_ntop.c ldns/config.h +compat/b64_pton.lo compat/b64_pton.o: setup-builddir $(srcdir)/compat/b64_pton.c ldns/config.h +compat/calloc.lo compat/calloc.o: setup-builddir $(srcdir)/compat/calloc.c ldns/config.h +compat/ctime_r.lo compat/ctime_r.o: setup-builddir $(srcdir)/compat/ctime_r.c ldns/config.h +compat/fake-rfc2553.lo compat/fake-rfc2553.o: setup-builddir $(srcdir)/compat/fake-rfc2553.c ldns/config.h ldns/common.h \ $(srcdir)/compat/fake-rfc2553.h -compat/gmtime_r.lo compat/gmtime_r.o: $(srcdir)/compat/gmtime_r.c ldns/config.h -compat/inet_aton.lo compat/inet_aton.o: $(srcdir)/compat/inet_aton.c ldns/config.h -compat/inet_ntop.lo compat/inet_ntop.o: $(srcdir)/compat/inet_ntop.c ldns/config.h -compat/inet_pton.lo compat/inet_pton.o: $(srcdir)/compat/inet_pton.c ldns/config.h -compat/isascii.lo compat/isascii.o: $(srcdir)/compat/isascii.c ldns/config.h -compat/isblank.lo compat/isblank.o: $(srcdir)/compat/isblank.c ldns/config.h -compat/localtime_r.lo compat/localtime_r.o: $(srcdir)/compat/localtime_r.c ldns/config.h -compat/malloc.lo compat/malloc.o: $(srcdir)/compat/malloc.c ldns/config.h -compat/memmove.lo compat/memmove.o: $(srcdir)/compat/memmove.c ldns/config.h -compat/realloc.lo compat/realloc.o: $(srcdir)/compat/realloc.c ldns/config.h -compat/snprintf.lo compat/snprintf.o: $(srcdir)/compat/snprintf.c ldns/config.h -compat/strlcpy.lo compat/strlcpy.o: $(srcdir)/compat/strlcpy.c ldns/config.h -compat/timegm.lo compat/timegm.o: $(srcdir)/compat/timegm.c ldns/config.h -examples/ldns-chaos.lo examples/ldns-chaos.o: $(srcdir)/examples/ldns-chaos.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +compat/gmtime_r.lo compat/gmtime_r.o: setup-builddir $(srcdir)/compat/gmtime_r.c ldns/config.h +compat/inet_aton.lo compat/inet_aton.o: setup-builddir $(srcdir)/compat/inet_aton.c ldns/config.h +compat/inet_ntop.lo compat/inet_ntop.o: setup-builddir $(srcdir)/compat/inet_ntop.c ldns/config.h +compat/inet_pton.lo compat/inet_pton.o: setup-builddir $(srcdir)/compat/inet_pton.c ldns/config.h +compat/isascii.lo compat/isascii.o: setup-builddir $(srcdir)/compat/isascii.c ldns/config.h +compat/isblank.lo compat/isblank.o: setup-builddir $(srcdir)/compat/isblank.c ldns/config.h +compat/localtime_r.lo compat/localtime_r.o: setup-builddir $(srcdir)/compat/localtime_r.c ldns/config.h +compat/malloc.lo compat/malloc.o: setup-builddir $(srcdir)/compat/malloc.c ldns/config.h +compat/memmove.lo compat/memmove.o: setup-builddir $(srcdir)/compat/memmove.c ldns/config.h +compat/realloc.lo compat/realloc.o: setup-builddir $(srcdir)/compat/realloc.c ldns/config.h +compat/snprintf.lo compat/snprintf.o: setup-builddir $(srcdir)/compat/snprintf.c ldns/config.h +compat/strlcpy.lo compat/strlcpy.o: setup-builddir $(srcdir)/compat/strlcpy.c ldns/config.h +compat/timegm.lo compat/timegm.o: setup-builddir $(srcdir)/compat/timegm.c ldns/config.h +examples/ldns-chaos.lo examples/ldns-chaos.o: setup-builddir $(srcdir)/examples/ldns-chaos.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -834,7 +836,7 @@ examples/ldns-chaos.lo examples/ldns-chaos.o: $(srcdir)/examples/ldns-chaos.c ld $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-compare-zones.lo examples/ldns-compare-zones.o: $(srcdir)/examples/ldns-compare-zones.c ldns/config.h $(srcdir)/ldns/ldns.h \ +examples/ldns-compare-zones.lo examples/ldns-compare-zones.o: setup-builddir $(srcdir)/examples/ldns-compare-zones.c ldns/config.h $(srcdir)/ldns/ldns.h \ ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \ $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \ $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h \ @@ -842,7 +844,7 @@ examples/ldns-compare-zones.lo examples/ldns-compare-zones.o: $(srcdir)/examples $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h \ ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h \ $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-dane.lo examples/ldns-dane.o: $(srcdir)/examples/ldns-dane.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +examples/ldns-dane.lo examples/ldns-dane.o: setup-builddir $(srcdir)/examples/ldns-dane.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -850,7 +852,7 @@ examples/ldns-dane.lo examples/ldns-dane.o: $(srcdir)/examples/ldns-dane.c ldns/ $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldnsd.lo examples/ldnsd.o: $(srcdir)/examples/ldnsd.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ +examples/ldnsd.lo examples/ldnsd.o: setup-builddir $(srcdir)/examples/ldnsd.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ @@ -858,15 +860,15 @@ examples/ldnsd.lo examples/ldnsd.o: $(srcdir)/examples/ldnsd.c ldns/config.h $(s $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-dpa.lo examples/ldns-dpa.o: $(srcdir)/examples/ldns-dpa.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +examples/ldns-dpa.lo examples/ldns-dpa.o: setup-builddir $(srcdir)/examples/ldns-dpa.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ $(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h \ $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ - $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h $(srcdir)/examples/ldns-dpa.h -examples/ldns-gen-zone.lo examples/ldns-gen-zone.o: $(srcdir)/examples/ldns-gen-zone.c ldns/config.h $(srcdir)/ldns/ldns.h \ + $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h +examples/ldns-gen-zone.lo examples/ldns-gen-zone.o: setup-builddir $(srcdir)/examples/ldns-gen-zone.c ldns/config.h $(srcdir)/ldns/ldns.h \ ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \ $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \ $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h \ @@ -874,7 +876,7 @@ examples/ldns-gen-zone.lo examples/ldns-gen-zone.o: $(srcdir)/examples/ldns-gen- $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h \ ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h \ $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-key2ds.lo examples/ldns-key2ds.o: $(srcdir)/examples/ldns-key2ds.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +examples/ldns-key2ds.lo examples/ldns-key2ds.o: setup-builddir $(srcdir)/examples/ldns-key2ds.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -882,7 +884,7 @@ examples/ldns-key2ds.lo examples/ldns-key2ds.o: $(srcdir)/examples/ldns-key2ds.c $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-keyfetcher.lo examples/ldns-keyfetcher.o: $(srcdir)/examples/ldns-keyfetcher.c ldns/config.h $(srcdir)/ldns/ldns.h \ +examples/ldns-keyfetcher.lo examples/ldns-keyfetcher.o: setup-builddir $(srcdir)/examples/ldns-keyfetcher.c ldns/config.h $(srcdir)/ldns/ldns.h \ ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \ $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \ $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h \ @@ -890,7 +892,7 @@ examples/ldns-keyfetcher.lo examples/ldns-keyfetcher.o: $(srcdir)/examples/ldns- $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h \ ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h \ $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-keygen.lo examples/ldns-keygen.o: $(srcdir)/examples/ldns-keygen.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +examples/ldns-keygen.lo examples/ldns-keygen.o: setup-builddir $(srcdir)/examples/ldns-keygen.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -898,7 +900,7 @@ examples/ldns-keygen.lo examples/ldns-keygen.o: $(srcdir)/examples/ldns-keygen.c $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-mx.lo examples/ldns-mx.o: $(srcdir)/examples/ldns-mx.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +examples/ldns-mx.lo examples/ldns-mx.o: setup-builddir $(srcdir)/examples/ldns-mx.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -906,7 +908,7 @@ examples/ldns-mx.lo examples/ldns-mx.o: $(srcdir)/examples/ldns-mx.c ldns/config $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-notify.lo examples/ldns-notify.o: $(srcdir)/examples/ldns-notify.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +examples/ldns-notify.lo examples/ldns-notify.o: setup-builddir $(srcdir)/examples/ldns-notify.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -914,7 +916,7 @@ examples/ldns-notify.lo examples/ldns-notify.o: $(srcdir)/examples/ldns-notify.c $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-nsec3-hash.lo examples/ldns-nsec3-hash.o: $(srcdir)/examples/ldns-nsec3-hash.c ldns/config.h $(srcdir)/ldns/ldns.h \ +examples/ldns-nsec3-hash.lo examples/ldns-nsec3-hash.o: setup-builddir $(srcdir)/examples/ldns-nsec3-hash.c ldns/config.h $(srcdir)/ldns/ldns.h \ ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \ $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \ $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h \ @@ -922,7 +924,7 @@ examples/ldns-nsec3-hash.lo examples/ldns-nsec3-hash.o: $(srcdir)/examples/ldns- $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h \ ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h \ $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-read-zone.lo examples/ldns-read-zone.o: $(srcdir)/examples/ldns-read-zone.c ldns/config.h $(srcdir)/ldns/ldns.h \ +examples/ldns-read-zone.lo examples/ldns-read-zone.o: setup-builddir $(srcdir)/examples/ldns-read-zone.c ldns/config.h $(srcdir)/ldns/ldns.h \ ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \ $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \ $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h \ @@ -930,7 +932,7 @@ examples/ldns-read-zone.lo examples/ldns-read-zone.o: $(srcdir)/examples/ldns-re $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h \ ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h \ $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-resolver.lo examples/ldns-resolver.o: $(srcdir)/examples/ldns-resolver.c ldns/config.h $(srcdir)/ldns/ldns.h \ +examples/ldns-resolver.lo examples/ldns-resolver.o: setup-builddir $(srcdir)/examples/ldns-resolver.c ldns/config.h $(srcdir)/ldns/ldns.h \ ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \ $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \ $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h \ @@ -938,7 +940,7 @@ examples/ldns-resolver.lo examples/ldns-resolver.o: $(srcdir)/examples/ldns-reso $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h \ ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h \ $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-revoke.lo examples/ldns-revoke.o: $(srcdir)/examples/ldns-revoke.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +examples/ldns-revoke.lo examples/ldns-revoke.o: setup-builddir $(srcdir)/examples/ldns-revoke.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -946,7 +948,7 @@ examples/ldns-revoke.lo examples/ldns-revoke.o: $(srcdir)/examples/ldns-revoke.c $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-rrsig.lo examples/ldns-rrsig.o: $(srcdir)/examples/ldns-rrsig.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +examples/ldns-rrsig.lo examples/ldns-rrsig.o: setup-builddir $(srcdir)/examples/ldns-rrsig.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -954,7 +956,7 @@ examples/ldns-rrsig.lo examples/ldns-rrsig.o: $(srcdir)/examples/ldns-rrsig.c ld $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-signzone.lo examples/ldns-signzone.o: $(srcdir)/examples/ldns-signzone.c ldns/config.h $(srcdir)/ldns/ldns.h \ +examples/ldns-signzone.lo examples/ldns-signzone.o: setup-builddir $(srcdir)/examples/ldns-signzone.c ldns/config.h $(srcdir)/ldns/ldns.h \ ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \ $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \ $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h \ @@ -962,7 +964,7 @@ examples/ldns-signzone.lo examples/ldns-signzone.o: $(srcdir)/examples/ldns-sign $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h \ ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h \ $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-test-edns.lo examples/ldns-test-edns.o: $(srcdir)/examples/ldns-test-edns.c ldns/config.h $(srcdir)/ldns/ldns.h \ +examples/ldns-test-edns.lo examples/ldns-test-edns.o: setup-builddir $(srcdir)/examples/ldns-test-edns.c ldns/config.h $(srcdir)/ldns/ldns.h \ ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \ $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \ $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h \ @@ -970,7 +972,7 @@ examples/ldns-test-edns.lo examples/ldns-test-edns.o: $(srcdir)/examples/ldns-te $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h \ ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h \ $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-testns.lo examples/ldns-testns.o: $(srcdir)/examples/ldns-testns.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +examples/ldns-testns.lo examples/ldns-testns.o: setup-builddir $(srcdir)/examples/ldns-testns.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -979,7 +981,7 @@ examples/ldns-testns.lo examples/ldns-testns.o: $(srcdir)/examples/ldns-testns.c $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h \ $(srcdir)/examples/ldns-testpkts.h -examples/ldns-testpkts.lo examples/ldns-testpkts.o: $(srcdir)/examples/ldns-testpkts.c ldns/config.h $(srcdir)/ldns/ldns.h \ +examples/ldns-testpkts.lo examples/ldns-testpkts.o: setup-builddir $(srcdir)/examples/ldns-testpkts.c ldns/config.h $(srcdir)/ldns/ldns.h \ ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \ $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \ $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h \ @@ -988,7 +990,7 @@ examples/ldns-testpkts.lo examples/ldns-testpkts.o: $(srcdir)/examples/ldns-test ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h \ $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h \ $(srcdir)/examples/ldns-testpkts.h -examples/ldns-update.lo examples/ldns-update.o: $(srcdir)/examples/ldns-update.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +examples/ldns-update.lo examples/ldns-update.o: setup-builddir $(srcdir)/examples/ldns-update.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -996,7 +998,7 @@ examples/ldns-update.lo examples/ldns-update.o: $(srcdir)/examples/ldns-update.c $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-verify-zone.lo examples/ldns-verify-zone.o: $(srcdir)/examples/ldns-verify-zone.c ldns/config.h $(srcdir)/ldns/ldns.h \ +examples/ldns-verify-zone.lo examples/ldns-verify-zone.o: setup-builddir $(srcdir)/examples/ldns-verify-zone.c ldns/config.h $(srcdir)/ldns/ldns.h \ ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \ $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \ $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h \ @@ -1004,7 +1006,7 @@ examples/ldns-verify-zone.lo examples/ldns-verify-zone.o: $(srcdir)/examples/ldn $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h \ ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h \ $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-version.lo examples/ldns-version.o: $(srcdir)/examples/ldns-version.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +examples/ldns-version.lo examples/ldns-version.o: setup-builddir $(srcdir)/examples/ldns-version.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -1012,7 +1014,7 @@ examples/ldns-version.lo examples/ldns-version.o: $(srcdir)/examples/ldns-versio $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-walk.lo examples/ldns-walk.o: $(srcdir)/examples/ldns-walk.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +examples/ldns-walk.lo examples/ldns-walk.o: setup-builddir $(srcdir)/examples/ldns-walk.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -1020,7 +1022,7 @@ examples/ldns-walk.lo examples/ldns-walk.o: $(srcdir)/examples/ldns-walk.c ldns/ $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-zcat.lo examples/ldns-zcat.o: $(srcdir)/examples/ldns-zcat.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +examples/ldns-zcat.lo examples/ldns-zcat.o: setup-builddir $(srcdir)/examples/ldns-zcat.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -1028,7 +1030,7 @@ examples/ldns-zcat.lo examples/ldns-zcat.o: $(srcdir)/examples/ldns-zcat.c ldns/ $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-zsplit.lo examples/ldns-zsplit.o: $(srcdir)/examples/ldns-zsplit.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ +examples/ldns-zsplit.lo examples/ldns-zsplit.o: setup-builddir $(srcdir)/examples/ldns-zsplit.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \ ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \ $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h \ $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h \ @@ -1036,7 +1038,7 @@ examples/ldns-zsplit.lo examples/ldns-zsplit.o: $(srcdir)/examples/ldns-zsplit.c $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -drill/chasetrace.lo drill/chasetrace.o: $(srcdir)/drill/chasetrace.c $(srcdir)/drill/drill.h ldns/config.h \ +drill/chasetrace.lo drill/chasetrace.o: setup-builddir $(srcdir)/drill/chasetrace.c $(srcdir)/drill/drill.h ldns/config.h \ $(srcdir)/drill/drill_util.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h \ $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h \ $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \ @@ -1045,7 +1047,7 @@ drill/chasetrace.lo drill/chasetrace.o: $(srcdir)/drill/chasetrace.c $(srcdir)/d $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -drill/dnssec.lo drill/dnssec.o: $(srcdir)/drill/dnssec.c $(srcdir)/drill/drill.h ldns/config.h $(srcdir)/drill/drill_util.h \ +drill/dnssec.lo drill/dnssec.o: setup-builddir $(srcdir)/drill/dnssec.c $(srcdir)/drill/drill.h ldns/config.h $(srcdir)/drill/drill_util.h \ $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h \ $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h \ $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h \ @@ -1054,7 +1056,7 @@ drill/dnssec.lo drill/dnssec.o: $(srcdir)/drill/dnssec.c $(srcdir)/drill/drill.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -drill/drill.lo drill/drill.o: $(srcdir)/drill/drill.c $(srcdir)/drill/drill.h ldns/config.h $(srcdir)/drill/drill_util.h \ +drill/drill.lo drill/drill.o: setup-builddir $(srcdir)/drill/drill.c $(srcdir)/drill/drill.h ldns/config.h $(srcdir)/drill/drill_util.h \ $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h \ $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h \ $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h \ @@ -1063,7 +1065,7 @@ drill/drill.lo drill/drill.o: $(srcdir)/drill/drill.c $(srcdir)/drill/drill.h ld $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -drill/drill_util.lo drill/drill_util.o: $(srcdir)/drill/drill_util.c $(srcdir)/drill/drill.h ldns/config.h \ +drill/drill_util.lo drill/drill_util.o: setup-builddir $(srcdir)/drill/drill_util.c $(srcdir)/drill/drill.h ldns/config.h \ $(srcdir)/drill/drill_util.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h \ $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h \ $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \ @@ -1072,7 +1074,7 @@ drill/drill_util.lo drill/drill_util.o: $(srcdir)/drill/drill_util.c $(srcdir)/d $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -drill/error.lo drill/error.o: $(srcdir)/drill/error.c $(srcdir)/drill/drill.h ldns/config.h $(srcdir)/drill/drill_util.h \ +drill/error.lo drill/error.o: setup-builddir $(srcdir)/drill/error.c $(srcdir)/drill/drill.h ldns/config.h $(srcdir)/drill/drill_util.h \ $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h \ $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h \ $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h \ @@ -1081,7 +1083,7 @@ drill/error.lo drill/error.o: $(srcdir)/drill/error.c $(srcdir)/drill/drill.h ld $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -drill/root.lo drill/root.o: $(srcdir)/drill/root.c $(srcdir)/drill/drill.h ldns/config.h $(srcdir)/drill/drill_util.h \ +drill/root.lo drill/root.o: setup-builddir $(srcdir)/drill/root.c $(srcdir)/drill/drill.h ldns/config.h $(srcdir)/drill/drill_util.h \ $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h \ $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h \ $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h \ @@ -1090,7 +1092,7 @@ drill/root.lo drill/root.o: $(srcdir)/drill/root.c $(srcdir)/drill/drill.h ldns/ $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -drill/securetrace.lo drill/securetrace.o: $(srcdir)/drill/securetrace.c $(srcdir)/drill/drill.h ldns/config.h \ +drill/securetrace.lo drill/securetrace.o: setup-builddir $(srcdir)/drill/securetrace.c $(srcdir)/drill/drill.h ldns/config.h \ $(srcdir)/drill/drill_util.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h \ $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h \ $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \ @@ -1099,7 +1101,7 @@ drill/securetrace.lo drill/securetrace.o: $(srcdir)/drill/securetrace.c $(srcdir $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -drill/work.lo drill/work.o: $(srcdir)/drill/work.c $(srcdir)/drill/drill.h ldns/config.h $(srcdir)/drill/drill_util.h \ +drill/work.lo drill/work.o: setup-builddir $(srcdir)/drill/work.c $(srcdir)/drill/drill.h ldns/config.h $(srcdir)/drill/drill_util.h \ $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h \ $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h \ $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h \ From d786f178a2e635df83e69fab1b0350d52c2cdaf1 Mon Sep 17 00:00:00 2001 From: TCY16 Date: Mon, 7 Nov 2022 13:38:21 +0100 Subject: [PATCH 04/64] add missing EDNS support for ldns-testns --- examples/ldns-testpkts.c | 21 +++++++++++++++++++-- host2str.c | 1 + packet.c | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/examples/ldns-testpkts.c b/examples/ldns-testpkts.c index 05a54c58..aa0b570c 100644 --- a/examples/ldns-testpkts.c +++ b/examples/ldns-testpkts.c @@ -85,6 +85,7 @@ entry_add_reply(struct entry* entry) pkt->packet_sleep = 0; pkt->reply = ldns_pkt_new(); pkt->reply_from_hex = NULL; + pkt->raw_ednsdata = NULL; /* link at end */ while(*p) p = &((*p)->next); @@ -324,11 +325,11 @@ data_buffer2wire(ldns_buffer *data_buffer) size_t wirelen; uint8_t *data_wire = (uint8_t *) ldns_buffer_begin(data_buffer); uint8_t *wire = LDNS_XMALLOC(uint8_t, LDNS_MAX_PACKETLEN); - + hexbuf = LDNS_XMALLOC(uint8_t, LDNS_MAX_PACKETLEN); for (data_buf_pos = 0; data_buf_pos < ldns_buffer_position(data_buffer); data_buf_pos++) { c = (int) data_wire[data_buf_pos]; - + if (state < 2 && !isascii(c)) { /*verbose("non ascii character found in file: (%d) switching to raw mode\n", c);*/ state = 2; @@ -502,6 +503,7 @@ read_entry(FILE* in, const char* name, int *lineno, uint32_t* default_ttl, ldns_buffer_printf(hex_data_buffer, line); } else if(str_keyword(&parse, "HEX_EDNSDATA_BEGIN")) { hex_ednsdata_buffer = ldns_buffer_new(LDNS_MAX_PACKETLEN); + reading_hex_ednsdata = true; } else if(str_keyword(&parse, "HEX_EDNSDATA_END")) { if (!reading_hex_ednsdata) { @@ -893,6 +895,21 @@ handle_query(uint8_t* inbuf, ssize_t inlen, struct entry* entries, int* count, } else { answer_pkt = ldns_pkt_clone(p->reply); adjust_packet(entry, answer_pkt, query_pkt); + + /* add EDNS from canned reply */ + + if (p->raw_ednsdata) { + ldns_pkt_set_edns_udp_size(answer_pkt, ldns_pkt_edns_udp_size(query_pkt)); + ldns_pkt_set_edns_extended_rcode(answer_pkt, ldns_pkt_edns_extended_rcode(query_pkt)); + ldns_pkt_set_edns_version(answer_pkt, ldns_pkt_edns_version(query_pkt)); + answer_pkt->_edns_present = true; + ldns_pkt_set_edns_z(answer_pkt, ldns_pkt_edns_z(query_pkt)); + ldns_pkt_set_edns_data(answer_pkt, + ldns_rdf_new_frm_data(LDNS_RDF_TYPE_UNKNOWN, + ldns_buffer_limit(p->raw_ednsdata), + ldns_buffer_export(p->raw_ednsdata))); + } + if(verbose_out) ldns_pkt_print(verbose_out, answer_pkt); status = ldns_pkt2wire(&outbuf, answer_pkt, &answer_size); verbose(1, "Answer packet size: %u bytes.\n", (unsigned int)answer_size); diff --git a/host2str.c b/host2str.c index 7282db9e..904c5fa0 100644 --- a/host2str.c +++ b/host2str.c @@ -2788,6 +2788,7 @@ ldns_pkt2buffer_str_fmt(ldns_buffer *output, } else { ldns_buffer_printf(output, ";; Data: "); (void)ldns_rdf2buffer_str(output, ldns_pkt_edns_data(pkt)); + ldns_buffer_printf(output, "\n"); } } } diff --git a/packet.c b/packet.c index afa59005..4d68c234 100644 --- a/packet.c +++ b/packet.c @@ -781,7 +781,7 @@ pkt_edns_data2edns_option_list(const ldns_rdf *edns_data) ldns_edns_option* edns; uint8_t *data; - if (pos + 4 > max) { /* make sure the header is */ + if (pos + 4 > max) { /* make sure the header fits */ ldns_edns_option_list_deep_free(edns_list); return NULL; } From d0adc919b4c4e6424d8adc22f9d4adb8f8348173 Mon Sep 17 00:00:00 2001 From: TCY16 Date: Mon, 7 Nov 2022 14:06:57 +0100 Subject: [PATCH 05/64] move location where the EDNS is added --- examples/ldns-testpkts.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/examples/ldns-testpkts.c b/examples/ldns-testpkts.c index aa0b570c..e2ca71fd 100644 --- a/examples/ldns-testpkts.c +++ b/examples/ldns-testpkts.c @@ -506,12 +506,24 @@ read_entry(FILE* in, const char* name, int *lineno, uint32_t* default_ttl, reading_hex_ednsdata = true; } else if(str_keyword(&parse, "HEX_EDNSDATA_END")) { + ldns_buffer* edns = NULL; if (!reading_hex_ednsdata) { error("%s line %d: HEX_EDNSDATA_END read but no" "HEX_EDNSDATA_BEGIN keyword seen", name, *lineno); } reading_hex_ednsdata = false; + + edns = data_buffer2wire(hex_ednsdata_buffer); + + /* add read-in EDNS directly to the reply */ + ldns_pkt_set_edns_data(cur_reply->reply, + ldns_rdf_new_frm_data(LDNS_RDF_TYPE_UNKNOWN, + ldns_buffer_limit(edns), + ldns_buffer_begin(edns))); + + /* store raw EDNS for matching */ cur_reply->raw_ednsdata = data_buffer2wire(hex_ednsdata_buffer); + ldns_buffer_free(hex_ednsdata_buffer); hex_ednsdata_buffer = NULL; } else if(reading_hex_ednsdata) { @@ -895,21 +907,6 @@ handle_query(uint8_t* inbuf, ssize_t inlen, struct entry* entries, int* count, } else { answer_pkt = ldns_pkt_clone(p->reply); adjust_packet(entry, answer_pkt, query_pkt); - - /* add EDNS from canned reply */ - - if (p->raw_ednsdata) { - ldns_pkt_set_edns_udp_size(answer_pkt, ldns_pkt_edns_udp_size(query_pkt)); - ldns_pkt_set_edns_extended_rcode(answer_pkt, ldns_pkt_edns_extended_rcode(query_pkt)); - ldns_pkt_set_edns_version(answer_pkt, ldns_pkt_edns_version(query_pkt)); - answer_pkt->_edns_present = true; - ldns_pkt_set_edns_z(answer_pkt, ldns_pkt_edns_z(query_pkt)); - ldns_pkt_set_edns_data(answer_pkt, - ldns_rdf_new_frm_data(LDNS_RDF_TYPE_UNKNOWN, - ldns_buffer_limit(p->raw_ednsdata), - ldns_buffer_export(p->raw_ednsdata))); - } - if(verbose_out) ldns_pkt_print(verbose_out, answer_pkt); status = ldns_pkt2wire(&outbuf, answer_pkt, &answer_size); verbose(1, "Answer packet size: %u bytes.\n", (unsigned int)answer_size); From 8b4be670756457c06a8aba6f7cccffeb479e01af Mon Sep 17 00:00:00 2001 From: TCY16 Date: Mon, 7 Nov 2022 14:09:27 +0100 Subject: [PATCH 06/64] add missing buffer_free --- examples/ldns-testpkts.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/ldns-testpkts.c b/examples/ldns-testpkts.c index e2ca71fd..09b5c23b 100644 --- a/examples/ldns-testpkts.c +++ b/examples/ldns-testpkts.c @@ -524,6 +524,7 @@ read_entry(FILE* in, const char* name, int *lineno, uint32_t* default_ttl, /* store raw EDNS for matching */ cur_reply->raw_ednsdata = data_buffer2wire(hex_ednsdata_buffer); + ldns_buffer_free(edns); ldns_buffer_free(hex_ednsdata_buffer); hex_ednsdata_buffer = NULL; } else if(reading_hex_ednsdata) { From 07956ce685f1d2fba4c2b486dacddb114a857b1c Mon Sep 17 00:00:00 2001 From: tcarpay <8014108+TCY16@users.noreply.github.com> Date: Tue, 8 Nov 2022 13:02:39 +0100 Subject: [PATCH 07/64] add HEX_EDNSDATA entry --- examples/ldns-testns.1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/ldns-testns.1 b/examples/ldns-testns.1 index e21bcf08..f1e1f511 100644 --- a/examples/ldns-testns.1 +++ b/examples/ldns-testns.1 @@ -109,6 +109,10 @@ SECTION AUTHORITY SECTION ADDITIONAL +HEX_EDNSDATA_BEGIN + +HEX_EDNSDATA_END + EXTRA_PACKET ; follow with SECTION, REPLY for more packets. HEX_ANSWER_BEGIN ; follow with hex data ; this replaces any answer packet constructed From b4a02f1ceb1f40b298e1537a2e78ddbd41751656 Mon Sep 17 00:00:00 2001 From: tcarpay <8014108+TCY16@users.noreply.github.com> Date: Tue, 8 Nov 2022 13:05:51 +0100 Subject: [PATCH 08/64] Add HEX_EDNSDATA documentation --- examples/ldns-testns.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/examples/ldns-testns.c b/examples/ldns-testns.c index f1b9c722..689bbd1c 100644 --- a/examples/ldns-testns.c +++ b/examples/ldns-testns.c @@ -63,6 +63,9 @@ SECTION ADDITIONAL + HEX_EDNSDATA_BEGIN + + HEX_EDNSDATA_END EXTRA_PACKET ; follow with SECTION, REPLY for more packets. HEX_ANSWER_BEGIN ; follow with hex data ; this replaces any answer packet constructed @@ -88,6 +91,12 @@ SECTION ANSWER www.nlnetlabs.nl. IN A 195.169.215.155 SECTION AUTHORITY nlnetlabs.nl. IN NS www.nlnetlabs.nl. +HEX_EDNSDATA_BEGIN +00 03 ; NSID +00 04 ; LENGTH +4E 53 ; NS +49 44 ; ID +HEX_EDNSDATA_END ENTRY_END ENTRY_BEGIN From e400fa99bd3e5ab16903b309ade2ec5a480ee662 Mon Sep 17 00:00:00 2001 From: tcarpay <8014108+TCY16@users.noreply.github.com> Date: Thu, 10 Nov 2022 16:21:13 +0100 Subject: [PATCH 09/64] Fix breaking ref --- host2str.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/host2str.c b/host2str.c index 7282db9e..fe336128 100644 --- a/host2str.c +++ b/host2str.c @@ -2402,11 +2402,11 @@ ldns_edns_padding2buffer_str(ldns_buffer* output, uint8_t* data, size_t len) static ldns_status ldns_edns_chain2buffer_str(ldns_buffer* output, uint8_t* data, size_t len) { - ldns_rdf** temp = NULL; + ldns_rdf* temp = NULL; ldns_buffer_printf(output, "; CHAIN: "); - if (ldns_str2rdf_dname(temp, (char*) data) != LDNS_STATUS_OK) { + if (ldns_str2rdf_dname(&temp, (char*) data) != LDNS_STATUS_OK) { ldns_buffer_printf(output, "malformed chain "); ldns_edns_hex_data2buffer_str(output, data, len); From 899c2f7a67a75624517a9e53e9884322e7f13d95 Mon Sep 17 00:00:00 2001 From: TCY16 Date: Fri, 11 Nov 2022 14:59:02 +0100 Subject: [PATCH 10/64] add missing print and breaking assignment --- host2str.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/host2str.c b/host2str.c index 904c5fa0..f8bce99d 100644 --- a/host2str.c +++ b/host2str.c @@ -2274,11 +2274,16 @@ ldns_edns_subnet2buffer_str(ldns_buffer* output, uint8_t* data, size_t len) { uint16_t family; uint8_t source, scope; + + ldns_buffer_printf(output, "; CLIENT SUBNET: "); + if(len < 4) { ldns_buffer_printf(output, "malformed subnet "); ldns_edns_hex_data2buffer_str(output, data, len); return ldns_buffer_status(output); } + + family = ldns_read_uint16(data); source = data[2]; scope = data[3]; @@ -2402,11 +2407,11 @@ ldns_edns_padding2buffer_str(ldns_buffer* output, uint8_t* data, size_t len) static ldns_status ldns_edns_chain2buffer_str(ldns_buffer* output, uint8_t* data, size_t len) { - ldns_rdf** temp = NULL; + ldns_rdf* temp = NULL; ldns_buffer_printf(output, "; CHAIN: "); - if (ldns_str2rdf_dname(temp, (char*) data) != LDNS_STATUS_OK) { + if (ldns_str2rdf_dname(&temp, (char*) data) != LDNS_STATUS_OK) { ldns_buffer_printf(output, "malformed chain "); ldns_edns_hex_data2buffer_str(output, data, len); @@ -2746,6 +2751,7 @@ ldns_pkt2buffer_str_fmt(ldns_buffer *output, ldns_buffer_printf(output, "\n"); ldns_buffer_printf(output, ";; ADDITIONAL SECTION:\n"); + for (i = 0; i < ldns_pkt_arcount(pkt); i++) { status = ldns_rr2buffer_str_fmt(output, fmt, ldns_rr_list_rr( From 59af7359ed744327aaf0deb2e6ac90fe9e191ba6 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sat, 19 Nov 2022 01:31:57 +0000 Subject: [PATCH 11/64] acx_nlnetlabs.m4: fix -Wstrict-prototypes Fix -Wstrict-prototypes as it's easy to do and avoids future warnings. Noticed when doing Clang 16 / GCC 14 / C23 work. For more information, see LWN.net [0] or LLVM's Discourse [1], the Gentoo wiki [2], or the (new) c-std-porting mailing list [3]. [0] https://lwn.net/Articles/913505/ [1] https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213 [2] https://wiki.gentoo.org/wiki/Modern_C_porting [3] hosted at lists.linux.dev. Signed-off-by: Sam James --- acx_nlnetlabs.m4 | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/acx_nlnetlabs.m4 b/acx_nlnetlabs.m4 index 39e92d87..0883a700 100644 --- a/acx_nlnetlabs.m4 +++ b/acx_nlnetlabs.m4 @@ -183,7 +183,7 @@ dnl cache=`echo $1 | sed 'y%.=/+- %___p__%'` AC_CACHE_VAL(cv_prog_cc_flag_needed_$cache, [ echo '$2' > conftest.c -echo 'void f(){}' >>conftest.c +echo 'void f(void){}' >>conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_needed_$cache=no" else @@ -229,7 +229,7 @@ dnl DEPFLAG: set to flag that generates dependencies. AC_DEFUN([ACX_DEPFLAG], [ AC_MSG_CHECKING([$CC dependency flag]) -echo 'void f(){}' >conftest.c +echo 'void f(void){}' >conftest.c if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then DEPFLAG="-MM" else @@ -268,7 +268,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -305,7 +305,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -331,7 +331,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG, [ #include #include -int test() { +int test(void) { int a = 0; return a; } @@ -341,7 +341,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_BSD_SOURCE -D_DEFAULT_SOURCE, [ #include -int test() { +int test(void) { int a; a = isascii(32); return a; @@ -352,7 +352,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE, [ #include -int test() { +int test(void) { struct in6_pktinfo inf; int a = (int)sizeof(inf); return a; @@ -366,7 +366,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE -D_FRSRESGID, [ #include -int test() { +int test(void) { int a = setresgid(0,0,0); a = setresuid(0,0,0); return a; @@ -381,7 +381,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_POSIX_C_SOURCE=200112, #endif #include -int test() { +int test(void) { int a = 0; char *t; time_t time = 0; @@ -409,7 +409,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D__EXTENSIONS__, #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -809,7 +809,7 @@ dnl try to see if an additional _LARGEFILE_SOURCE 1 is needed to get fseeko ACX_CHECK_COMPILER_FLAG_NEEDED(-D_LARGEFILE_SOURCE=1, [ #include -int test() { +int test(void) { int a = fseeko(stdin, 0, 0); return a; } @@ -834,7 +834,7 @@ char* (*f) () = getaddrinfo; #ifdef __cplusplus } #endif -int main() { +int main(void) { ; return 0; } @@ -898,7 +898,7 @@ cache=`echo $1 | sed 'y%.=/+-%___p_%'` AC_CACHE_VAL(cv_cc_deprecated_$cache, [ echo '$3' >conftest.c -echo 'void f(){ $2 }' >>conftest.c +echo 'void f(void){ $2 }' >>conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS -c conftest.c 2>&1 | grep -e deprecated -e unavailable`"; then eval "cv_cc_deprecated_$cache=no" else From 1ce94b15eef320d84b6047d9abb93d48d2f1cde5 Mon Sep 17 00:00:00 2001 From: Alex Band Date: Tue, 29 Nov 2022 14:37:43 +0100 Subject: [PATCH 12/64] Remove support section --- README | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/README b/README index 98575917..e07fdc07 100644 --- a/README +++ b/README @@ -106,26 +106,3 @@ Also, when building with SWIG older than 2.0.4, compiling pyldns produces many ``missing initializer'' warnings. Those are harmless too. -Your Support -NLnet Labs offers all of its software products as open source, most -published under a BSD license. You can download them, not only from the -NLnet Labs website but also through the various OS distributions for -which NSD, ldns, and Unbound are packaged. We therefore have little idea -who uses our software in production environments and have no direct ties -with 'our customers'. - -Therefore, we ask you to contact us at users@NLnetLabs.nl and tell us -whether you use one of our products in your production environment, -what that environment looks like, and maybe even share some praise. -We would like to refer to the fact that your organization is using our -products. We will only do that if you explicitly allow us. In all other -cases we will keep the information you share with us to ourselves. - -In addition to the moral support you can also support us -financially. NLnet Labs is a recognized not-for-profit charity foundation -that is chartered to develop open-source software and open-standards -for the Internet. If you use our software to satisfaction please express -that by giving us a donation. For small donations PayPal can be used. For -larger and regular donations please contact us at users@NLnetLabs.nl. Also -see http://www.nlnetlabs.nl/labs/contributors/. - From 5059586d0652fb7c4479530e5d5d21c666493ae6 Mon Sep 17 00:00:00 2001 From: Felipe Gasper Date: Tue, 6 Dec 2022 14:37:35 -0500 Subject: [PATCH 13/64] Skip drill tests for sig chasing as appropriate to build. This is needed for macOS CI testing. --- .../18-drill-tests1.tpkg/18-drill-tests1.test | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/test/18-drill-tests1.tpkg/18-drill-tests1.test b/test/18-drill-tests1.tpkg/18-drill-tests1.test index d7bd9bb0..18cae41e 100644 --- a/test/18-drill-tests1.tpkg/18-drill-tests1.test +++ b/test/18-drill-tests1.tpkg/18-drill-tests1.test @@ -57,17 +57,24 @@ wait_ldns_testns_up $TMPF1 PORT=`cat $TMPF1 | grep Listening | cut -d " " -f 4` echo "../../drill/drill -p $PORT -k test2-key -S @localhost ok.ok.test.jelte.nlnetlabs.nl" -../../drill/drill -p $PORT -k test2-key -S @localhost ok.ok.test.jelte.nlnetlabs.nl> $TMPF2 -if [[ $? -ne 0 ]]; then - cat $TMPF2 - if grep "No trusted keys found in tree: first error was: DNSSEC signature has expired" $TMPF2; then - echo "yes it is expired" - else - echo "Error in chase" - RESULT=1 - fi +if ../../drill/drill -h | grep \\s\\-S\\s >/dev/null; then + ../../drill/drill -p $PORT -k test2-key -S @localhost ok.ok.test.jelte.nlnetlabs.nl> $TMPF2 + + if [[ $? -ne 0 ]]; then + cat $TMPF2 + if grep "No trusted keys found in tree: first error was: DNSSEC signature has expired" $TMPF2; then + echo "yes it is expired" + else + echo "Error in chase" + RESULT=1 + fi + fi + +else + echo "SKIP (drill lacks -S)" fi + ../../drill/drill -p $PORT -t CH TXT server.stop. @localhost # make sure testns server is stopped From 6ca480a7d972c7ec72fa5b0d947165edbffbee1f Mon Sep 17 00:00:00 2001 From: Felipe Gasper Date: Tue, 6 Dec 2022 14:38:21 -0500 Subject: [PATCH 14/64] Enable CI testing for macOS. --- .github/workflows/testsuite.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index 69594e9a..e8108481 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -33,7 +33,4 @@ jobs: # macOS’s system OpenSSL (LibreSSL, actually) isn’t meant for linking, # and Homebrew’s# OpenSSL isn’t CI-friendly. So build without OpenSSL. - run: ./configure --without-ssl --disable-sha2 --disable-gost --disable-ecdsa --disable-dane - - # As of now the test suite requires OpenSSL, so no tests. - # cf. https://github.com/NLnetLabs/ldns/issues/162 - - run: make + - run: make test From 0d2d9b363730415490a11eeaadc554e81fa27b7b Mon Sep 17 00:00:00 2001 From: Felipe Gasper Date: Tue, 6 Dec 2022 19:36:53 -0500 Subject: [PATCH 15/64] Fix ldns_rdf2buffer_str_wks not to use after free. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue #201: endprotoent() needs not to be called until we’re finished with the protoent struct. (Found by running the test suite on OpenBSD.) --- host2str.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/host2str.c b/host2str.c index f8bce99d..deeeaf63 100644 --- a/host2str.c +++ b/host2str.c @@ -835,10 +835,6 @@ ldns_rdf2buffer_str_wks(ldns_buffer *output, const ldns_rdf *rdf) ldns_buffer_printf(output, "%u ", protocol_nr); } -#ifdef HAVE_ENDPROTOENT - endprotoent(); -#endif - for (current_service = 0; current_service < (ldns_rdf_size(rdf)-1)*8; current_service++) { if (ldns_get_bit(&(ldns_rdf_data(rdf)[1]), current_service)) { @@ -856,6 +852,11 @@ ldns_rdf2buffer_str_wks(ldns_buffer *output, const ldns_rdf *rdf) /* exit from loop before integer overflow */ if(current_service == 65535) { break; } } + +#ifdef HAVE_ENDPROTOENT + endprotoent(); +#endif + return ldns_buffer_status(output); } From b95e6ca9e2366ec812af424e32c70b4e98dcb2bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Tue, 3 Jan 2023 21:37:34 +0100 Subject: [PATCH 16/64] Update python configuration, support platform site dir Update to the most recent ax_python_devel.m4 from autoconf-archive 2022.09.03. It reports two separate directories, one for platform independent files, another for platform specific files. Make minimal change and switch to using platform dependent directory. Should work on python 3.12, which removes distutils module completely. --- Makefile.in | 2 +- ax_python_devel.m4 | 147 ++++++++++++++++++++++++++++++++++++--------- 2 files changed, 119 insertions(+), 30 deletions(-) diff --git a/Makefile.in b/Makefile.in index 6cffefa7..c793dd2a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -20,7 +20,7 @@ p5_dns_ldns_dir = $(srcdir)/contrib/DNS-LDNS PERL = @PERL@ swig = @swig@ swigpy_flags = -python @SWIGPY3@ -python_site = @PYTHON_SITE_PKG@ +python_site = @PYTHON_PLATFORM_SITE_PKG@ pyldns_inst = @PYLDNSINST@ pyldns_uninst = @PYLDNSUNINST@ pyldnsx_inst = @PYLDNSXINST@ diff --git a/ax_python_devel.m4 b/ax_python_devel.m4 index aff04f68..780584ea 100644 --- a/ax_python_devel.m4 +++ b/ax_python_devel.m4 @@ -67,7 +67,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 21 +#serial 32 AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL]) AC_DEFUN([AX_PYTHON_DEVEL],[ @@ -112,15 +112,39 @@ to something else than an empty string. fi # - # if the macro parameter ``version'' is set, honour it + # If the macro parameter ``version'' is set, honour it. + # A Python shim class, VPy, is used to implement correct version comparisons via + # string expressions, since e.g. a naive textual ">= 2.7.3" won't work for + # Python 2.7.10 (the ".1" being evaluated as less than ".3"). # if test -n "$1"; then AC_MSG_CHECKING([for a version of Python $1]) - ac_supports_python_ver=`$PYTHON -c "import sys; \ - ver = sys.version.split ()[[0]]; \ + cat << EOF > ax_python_devel_vpy.py +class VPy: + def vtup(self, s): + return tuple(map(int, s.strip().replace("rc", ".").split("."))) + def __init__(self): + import sys + self.vpy = tuple(sys.version_info) + def __eq__(self, s): + return self.vpy == self.vtup(s) + def __ne__(self, s): + return self.vpy != self.vtup(s) + def __lt__(self, s): + return self.vpy < self.vtup(s) + def __gt__(self, s): + return self.vpy > self.vtup(s) + def __le__(self, s): + return self.vpy <= self.vtup(s) + def __ge__(self, s): + return self.vpy >= self.vtup(s) +EOF + ac_supports_python_ver=`$PYTHON -c "import ax_python_devel_vpy; \ + ver = ax_python_devel_vpy.VPy(); \ print (ver $1)"` + rm -rf ax_python_devel_vpy*.py* __pycache__/ax_python_devel_vpy*.py* if test "$ac_supports_python_ver" = "True"; then - AC_MSG_RESULT([yes]) + AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) AC_MSG_ERROR([this package requires Python $1. @@ -135,16 +159,25 @@ variable to configure. See ``configure --help'' for reference. # # Check if you have distutils, else fail # - AC_MSG_CHECKING([for the distutils Python package]) - ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` + AC_MSG_CHECKING([for the sysconfig Python package]) + ac_sysconfig_result=`$PYTHON -c "import sysconfig" 2>&1` if test $? -eq 0; then AC_MSG_RESULT([yes]) + IMPORT_SYSCONFIG="import sysconfig" else AC_MSG_RESULT([no]) - AC_MSG_ERROR([cannot import Python module "distutils". + + AC_MSG_CHECKING([for the distutils Python package]) + ac_sysconfig_result=`$PYTHON -c "from distutils import sysconfig" 2>&1` + if test $? -eq 0; then + AC_MSG_RESULT([yes]) + IMPORT_SYSCONFIG="from distutils import sysconfig" + else + AC_MSG_ERROR([cannot import Python module "distutils". Please check your Python installation. The error was: -$ac_distutils_result]) - PYTHON_VERSION="" +$ac_sysconfig_result]) + PYTHON_VERSION="" + fi fi # @@ -152,10 +185,19 @@ $ac_distutils_result]) # AC_MSG_CHECKING([for Python include path]) if test -z "$PYTHON_CPPFLAGS"; then - python_path=`$PYTHON -c "import distutils.sysconfig; \ - print (distutils.sysconfig.get_python_inc ());"` - plat_python_path=`$PYTHON -c "import distutils.sysconfig; \ - print (distutils.sysconfig.get_python_inc (plat_specific=1));"` + if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then + # sysconfig module has different functions + python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \ + print (sysconfig.get_path ('include'));"` + plat_python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \ + print (sysconfig.get_path ('platinclude'));"` + else + # old distutils way + python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \ + print (sysconfig.get_python_inc ());"` + plat_python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \ + print (sysconfig.get_python_inc (plat_specific=1));"` + fi if test -n "${python_path}"; then if test "${plat_python_path}" != "${python_path}"; then python_path="-I$python_path -I$plat_python_path" @@ -179,7 +221,7 @@ $ac_distutils_result]) # join all versioning strings, on some systems # major/minor numbers could be in different list elements -from distutils.sysconfig import * +from sysconfig import * e = get_config_var('VERSION') if e is not None: print(e) @@ -190,7 +232,7 @@ EOD` ac_python_version=$PYTHON_VERSION else ac_python_version=`$PYTHON -c "import sys; \ - print (sys.version[[:3]])"` + print ("%d.%d" % sys.version_info[[:2]])"` fi fi @@ -202,8 +244,8 @@ EOD` ac_python_libdir=`cat< Date: Fri, 6 Jan 2023 15:54:01 +0000 Subject: [PATCH 17/64] Add functions to extract RFC 8914 extended errors --- edns.c | 39 +++++++++++++++++++++++++++++++++++++++ ldns/edns.h | 15 +++++++++++++++ ldns/error.h | 4 +++- 3 files changed, 57 insertions(+), 1 deletion(-) diff --git a/edns.c b/edns.c index 3d002d67..904f173d 100644 --- a/edns.c +++ b/edns.c @@ -10,6 +10,7 @@ * See the file LICENSE for the license */ +#include #include #define LDNS_OPTIONLIST_INIT 8 @@ -41,6 +42,44 @@ ldns_edns_get_data(const ldns_edns_option *edns) return edns->_data; } +ldns_status +ldns_edns_ede_get_code(const ldns_edns_option *edns, uint16_t *ede_code) +{ + assert(edns != NULL); + assert(ede_code != NULL); + + if (edns->_code != LDNS_EDNS_EDE) return LDNS_STATUS_NOT_EDE; + + if (edns->_size < 2) return LDNS_STATUS_EDE_OPTION_MALFORMED; + + *ede_code = (uint16_t) ntohs(*((uint16_t*) edns->_data)); + + return LDNS_STATUS_OK; +} + +ldns_status +ldns_edns_ede_get_text(const ldns_edns_option* edns, char **ede_text) +{ + assert(edns != NULL); + assert(ede_text != NULL); + + if (edns->_code != LDNS_EDNS_EDE) return LDNS_STATUS_NOT_EDE; + + if (edns->_size < 2) return LDNS_STATUS_EDE_OPTION_MALFORMED; + + *ede_text = NULL; + + if (edns->_size > 2) + { + *ede_text = (char*) malloc((edns->_size - 1) * sizeof(char)); + + memset(*ede_text, 0, edns->_size - 1); + memcpy(*ede_text, &edns->_data[2], edns->_size - 2); + } + + return LDNS_STATUS_OK; +} + ldns_buffer * ldns_edns_get_wireformat_buffer(const ldns_edns_option *edns) { diff --git a/ldns/edns.h b/ldns/edns.h index 594fda22..a33ed055 100644 --- a/ldns/edns.h +++ b/ldns/edns.h @@ -140,6 +140,21 @@ ldns_edns_option_code ldns_edns_get_code(const ldns_edns_option *edns); */ uint8_t *ldns_edns_get_data(const ldns_edns_option *edns); +/** + * extract the RFC 8914 extended error code value. + * \param[in] *edns the EDNS option to extract the extended error code from + * \param[inout] *ede_code pointer to an uint16_t in which to store the extended error code + * \return LDNS_STATUS_OK or an ldns_status message with the error (LDNS_STATUS_NOT_EDE or LDNS_STATUS_EDE_OPTION_MALFORMED) + */ +ldns_status ldns_edns_ede_get_code(const ldns_edns_option *edns, uint16_t *ede_code); + +/** + * extract the optional RFC 8914 extended error code text. + * \param[in] *edns the EDNS option to extract the extended error code from + * \param[inout] **ede_text pointer to a char* in which to store the extended error text; allocated buffer must be freed by the caller, assigns NULL if no text was provided in the EDNS option + * \return LDNS_STATUS_OK or an ldns_status message with the error (LDNS_STATUS_NOT_EDE or LDNS_STATUS_EDE_OPTION_MALFORMED) + */ +ldns_status ldns_edns_ede_get_text(const ldns_edns_option* edns, char **ede_text); /** * serialise the EDNS option into wireformat. diff --git a/ldns/error.h b/ldns/error.h index 2429b770..011df284 100644 --- a/ldns/error.h +++ b/ldns/error.h @@ -141,7 +141,9 @@ enum ldns_enum_status { LDNS_STATUS_RESERVED_SVCPARAM_KEY, LDNS_STATUS_NO_SVCPARAM_VALUE_EXPECTED, LDNS_STATUS_SVCPARAM_KEY_MORE_THAN_ONCE, - LDNS_STATUS_INVALID_SVCPARAM_VALUE + LDNS_STATUS_INVALID_SVCPARAM_VALUE, + LDNS_STATUS_NOT_EDE, + LDNS_STATUS_EDE_OPTION_MALFORMED }; typedef enum ldns_enum_status ldns_status; From 22a890681c91ac9f9f5070212a67b17371695b9b Mon Sep 17 00:00:00 2001 From: Jelte Jansen Date: Tue, 10 Jan 2023 11:56:51 +0100 Subject: [PATCH 18/64] improve 'next-label' algorithm in ldns-walk Rather than adding \000 to an existing label, add a new label "\000." to the start of the domain name, to find the closes next possible domain name. --- examples/ldns-walk.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/examples/ldns-walk.c b/examples/ldns-walk.c index 3710098a..f320b99d 100644 --- a/examples/ldns-walk.c +++ b/examples/ldns-walk.c @@ -38,24 +38,22 @@ create_dname_plus_1(ldns_rdf *dname) size_t i; ldns_dname2canonical(dname); - labellen = ldns_rdf_data(dname)[0]; if (verbosity >= 3) { printf("Create +e for "); ldns_rdf_print(stdout, dname); printf("\n"); } - if (labellen < 63) { - wire = malloc(ldns_rdf_size(dname) + 1); + if (ldns_rdf_size(dname) < LDNS_MAX_DOMAINLEN) { + wire = malloc(ldns_rdf_size(dname) + 2); if (!wire) { fprintf(stderr, "Malloc error: out of memory?\n"); exit(127); } - wire[0] = labellen + 1; - memcpy(&wire[1], ldns_rdf_data(dname) + 1, labellen); - memcpy(&wire[labellen+1], ldns_rdf_data(dname) + labellen, ldns_rdf_size(dname) - labellen); - wire[labellen+1] = (uint8_t) '\000'; + wire[0] = (uint8_t) 1; + wire[1] = (uint8_t) '\000'; + memcpy(&wire[2], ldns_rdf_data(dname), ldns_rdf_size(dname)); pos = 0; - status = ldns_wire2dname(&newdname, wire, ldns_rdf_size(dname) + 1, &pos); + status = ldns_wire2dname(&newdname, wire, ldns_rdf_size(dname) + 2, &pos); free(wire); } else { wire = malloc(ldns_rdf_size(dname)); @@ -63,6 +61,7 @@ create_dname_plus_1(ldns_rdf *dname) fprintf(stderr, "Malloc error: out of memory?\n"); exit(127); } + labellen = ldns_rdf_data(dname)[0]; wire[0] = labellen; memcpy(&wire[1], ldns_rdf_data(dname) + 1, labellen); memcpy(&wire[labellen], ldns_rdf_data(dname) + labellen, ldns_rdf_size(dname) - labellen); From aec4443f3af4077700f8dfff34e72c46583b44e1 Mon Sep 17 00:00:00 2001 From: Felipe Gasper Date: Tue, 6 Dec 2022 19:34:53 -0500 Subject: [PATCH 19/64] Fix codingstyle test to run on FreeBSD. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $OSTYPE under FreeBSD is “FreeBSD”, which doesn’t match “*bsd*”. This updates the test to accommodate that capitalization variance. --- test/codingstyle.tpkg/codingstyle.test | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/codingstyle.tpkg/codingstyle.test b/test/codingstyle.tpkg/codingstyle.test index 1bf5d6b2..758ccdf0 100644 --- a/test/codingstyle.tpkg/codingstyle.test +++ b/test/codingstyle.tpkg/codingstyle.test @@ -9,6 +9,8 @@ PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:. L=90 OPT="-ncs -sai -nut -ce -nfca -nlp -ncdb -br -ts08 -i8 -nbad" +LC_OSTYPE=$(echo $OSTYPE | tr 'A-Z' 'a-z') + st=0 for i in ../../*.c; do @@ -23,11 +25,11 @@ for i in ../../*.c; do continue;; esac - case $OSTYPE in + case $LC_OSTYPE in linux*) diff -w -u $i <(cat $i | indent -l$L $OPT) | grep ^--- ;; - *bsd*) + *bsd*) diff -w -u $i <(cat $i | gindent -l$L $OPT)| grep ^--- ;; darwin*) From 5624f6694e1a59f5f3f9ffc2d40ca4f5bc77ac82 Mon Sep 17 00:00:00 2001 From: Felipe Gasper Date: Tue, 6 Dec 2022 19:40:06 -0500 Subject: [PATCH 20/64] Expand CI: Cygwin, BSDs, musl libc, 32-bit, and big-endian. --- .github/workflows/testsuite.yml | 108 ++++++++++++++++++++++++++++++-- 1 file changed, 102 insertions(+), 6 deletions(-) diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index 69594e9a..74ee2905 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -8,27 +8,31 @@ on: jobs: linux: + name: Linux (Ubuntu) + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@main with: submodules: recursive - - run: libtoolize -ci - - run: autoreconf -fi + - run: libtoolize -vci + - run: autoreconf -vfi - run: ./configure - run: make test mac: + name: macOS + runs-on: macos-latest steps: - run: brew install automake libtool - - uses: actions/checkout@v3 + - uses: actions/checkout@main with: submodules: recursive - - run: glibtoolize -ci - - run: autoreconf -fi + - run: glibtoolize -vci + - run: autoreconf -vfi # macOS’s system OpenSSL (LibreSSL, actually) isn’t meant for linking, # and Homebrew’s# OpenSSL isn’t CI-friendly. So build without OpenSSL. @@ -37,3 +41,95 @@ jobs: # As of now the test suite requires OpenSSL, so no tests. # cf. https://github.com/NLnetLabs/ldns/issues/162 - run: make + + # Pending https://github.com/NLnetLabs/ldns/issues/197, + # only builds succeed here. + cygwin: + name: Cygwin + + runs-on: windows-latest + + steps: + - name: Make git ignore line breaks + run: git config --global core.autocrlf false + - name: Set up Cygwin + uses: cygwin/cygwin-install-action@master + with: + packages: make gcc-g++ bash libtool automake autoconf libssl-devel bind-utils + - uses: actions/checkout@main + with: + submodules: recursive + - shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + name: Build + run: | + cd $GITHUB_WORKSPACE + libtoolize -vci + autoreconf -vfi + ./configure + make + + qemu-alpine: + name: Linux (Alpine, ${{ matrix.platform }}) + + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + platform: + - i386 + - arm32v6 + - arm32v7 + - arm64v8 + - s390x + + steps: + - uses: actions/checkout@main + with: + submodules: recursive + - name: Get the qemu container + run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + - name: "${{ matrix.platform }}: Build and test" + run: docker run --rm --interactive --mount type=bind,source=$(pwd),target=/host ${{ matrix.platform }}/alpine sh -c "apk add make gcc libc-dev libtool automake autoconf openssl-dev m4 indent bash bind-tools && cd /host && libtoolize -vci && autoreconf -vfi && ./configure && make test" + + BSDs: + name: ${{ matrix.os.dispname }} ${{ matrix.os.version }} + + runs-on: macos-latest + + strategy: + fail-fast: false + matrix: + os: + - name: freebsd + dispname: FreeBSD + version: '13.0' + pkginstall: pkg install -y libtool automake bind-tools gmake gindent + env: + configure_args: + + # OpenBSD seems to require explicit auto* versions. + - name: openbsd + dispname: OpenBSD + version: '7.1' + pkginstall: pkg_add -v libtool gmake gindent automake-1.16.3 autoconf-2.71 + env: AUTOCONF_VERSION=2.71 AUTOMAKE_VERSION=1.16 + configure_args: --disable-dane-verify + + steps: + - uses: actions/checkout@main + with: + submodules: recursive + - name: Build and test on ${{ matrix.os.name }} + uses: cross-platform-actions/action@master + with: + operating_system: ${{ matrix.os.name }} + version: ${{ matrix.os.version }} + shell: bash + run: | + export DUMMY12345=1 ${{ matrix.os.env }} + sudo ${{ matrix.os.pkginstall }} + libtoolize -vci + autoreconf -vfi + ./configure ${{ matrix.os.configure_args }} + gmake test From 47bd63ad8467589dfad62ced7b648325ca0bc8ef Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 13 Jan 2023 15:59:11 +0000 Subject: [PATCH 21/64] Fixed review comment for missing error strings --- error.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/error.c b/error.c index e3fd1211..50cdc630 100644 --- a/error.c +++ b/error.c @@ -184,6 +184,11 @@ ldns_lookup_table ldns_error_str[] = { { LDNS_STATUS_INVALID_SVCPARAM_VALUE, "Invalid wireformat of a value " "in the ServiceParam rdata field of SVCB or HTTPS RR" }, + { LDNS_STATUS_NOT_EDE, + "The EDNS option is not an extended error code" }, + { LDNS_STATUS_EDE_OPTION_MALFORMED, + "The extended error code option is malformed, expected " + "at least 2 bytes of option data" }, { 0, NULL } }; From 0ede9674350597f7114d6c02050d7a0c854e5544 Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Thu, 26 Jan 2023 11:30:13 +0100 Subject: [PATCH 22/64] Update acx_nlnetlabs.m4 to version 45. * Updated the configure script for split openssl directories. --- Changelog | 1 + acx_nlnetlabs.m4 | 71 ++++++++++++++++++++++++++++++++++-------------- 2 files changed, 51 insertions(+), 21 deletions(-) diff --git a/Changelog b/Changelog index 08dd556e..a5477dee 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,7 @@ 1.8.4 2022-??-?? * Fix building documentation in build directory. Thanks Michael Tokarev + * Updated the configure script for split openssl directories. 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. diff --git a/acx_nlnetlabs.m4 b/acx_nlnetlabs.m4 index 0883a700..3d745727 100644 --- a/acx_nlnetlabs.m4 +++ b/acx_nlnetlabs.m4 @@ -2,7 +2,12 @@ # Copyright 2009, Wouter Wijngaards, NLnet Labs. # BSD licensed. # -# Version 41 +# Version 45 +# 2023-01-26 fix -Wstrict-prototypes. +# 2022-09-01 fix checking if nonblocking sockets work on OpenBSD. +# 2021-08-17 fix sed script in ssldir split handling. +# 2021-08-17 fix for openssl to detect split version, with ssldir_include +# and ssldir_lib output directories. # 2021-07-30 fix for openssl use of lib64 directory. # 2021-06-14 fix nonblocking test to use host instead of target for mingw test. # 2021-05-17 fix nonblocking socket test from grep on mingw32 to mingw for @@ -647,6 +652,30 @@ AC_DEFUN([ACX_SSL_CHECKS], [ withval=$1 if test x_$withval != x_no; then AC_MSG_CHECKING(for SSL) + if test -n "$withval"; then + dnl look for openssl install with different version, eg. + dnl in /usr/include/openssl11/openssl/ssl.h + dnl and /usr/lib64/openssl11/libssl.so + dnl with the --with-ssl=/usr/include/openssl11 + if test ! -f "$withval/include/openssl/ssl.h" -a -f "$withval/openssl/ssl.h"; then + ssldir="$withval" + found_ssl="yes" + withval="" + ssldir_include="$ssldir" + dnl find the libdir + ssldir_lib=`echo $ssldir | sed -e 's/include/lib/'` + if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then + : # found here + else + ssldir_lib=`echo $ssldir | sed -e 's/include/lib64/'` + if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then + : # found here + else + AC_MSG_ERROR([Could not find openssl lib file, $ssldir_lib/libssl.[so,a], pass like "/usr/local" or "/usr/include/openssl11"]) + fi + fi + fi + fi if test x_$withval = x_ -o x_$withval = x_yes; then withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr" fi @@ -654,12 +683,12 @@ AC_DEFUN([ACX_SSL_CHECKS], [ ssldir="$dir" if test -f "$dir/include/openssl/ssl.h"; then found_ssl="yes" - AC_DEFINE_UNQUOTED([HAVE_SSL], [], [Define if you have the SSL libraries installed.]) - dnl assume /usr/include is already in the include-path. - if test "$ssldir" != "/usr"; then - CPPFLAGS="$CPPFLAGS -I$ssldir/include" - LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include" - fi + ssldir_include="$ssldir/include" + if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then + ssldir_lib="$ssldir/lib64" + else + ssldir_lib="$ssldir/lib" + fi break; fi done @@ -667,19 +696,16 @@ AC_DEFUN([ACX_SSL_CHECKS], [ AC_MSG_ERROR(Cannot find the SSL libraries in $withval) else AC_MSG_RESULT(found in $ssldir) + AC_DEFINE_UNQUOTED([HAVE_SSL], [], [Define if you have the SSL libraries installed.]) HAVE_SSL=yes - dnl assume /usr is already in the lib and dynlib paths. - if test "$ssldir" != "/usr" -a "$ssldir" != ""; then - if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then - LDFLAGS="$LDFLAGS -L$ssldir/lib64" - LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib64" - ACX_RUNTIME_PATH_ADD([$ssldir/lib64]) - else - LDFLAGS="$LDFLAGS -L$ssldir/lib" - LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib" - ACX_RUNTIME_PATH_ADD([$ssldir/lib]) - fi - fi + dnl assume /usr is already in the include, lib and dynlib paths. + if test "$ssldir" != "/usr"; then + CPPFLAGS="$CPPFLAGS -I$ssldir_include" + LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir_include" + LDFLAGS="$LDFLAGS -L$ssldir_lib" + LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir_lib" + ACX_RUNTIME_PATH_ADD([$ssldir_lib]) + fi AC_MSG_CHECKING([for EVP_sha256 in -lcrypto]) LIBS="$LIBS -lcrypto" @@ -758,7 +784,7 @@ dnl AC_DEFUN([ACX_WITH_SSL], [ AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl=pathname],[enable SSL (will check /usr/local/ssl - /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr)]),[ + /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr or specify like /usr/include/openssl11)]),[ ],[ withval="yes" ]) @@ -776,7 +802,7 @@ dnl AC_DEFUN([ACX_WITH_SSL_OPTIONAL], [ AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl=pathname],[enable SSL (will check /usr/local/ssl - /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr)]),[ + /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr or specify like /usr/include/openssl11)]),[ ],[ withval="yes" ]) @@ -939,6 +965,9 @@ AC_LANG_SOURCE([[ #ifdef HAVE_SYS_TYPES_H #include #endif +#ifdef HAVE_SYS_SELECT_H +#include +#endif #ifdef HAVE_SYS_SOCKET_H #include #endif From 2779d15d1bdc59b2d25bc39fb532b205efd0e8d6 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Tue, 23 May 2023 00:30:13 +0200 Subject: [PATCH 23/64] ldns: fix the build in FreeBSD's base system This adds a copy of the function prototypes for internal functions where necessary. It effectively works around the following compilation error: error: no previous prototype for function [-Werror,-Wmissing-prototypes] Tested on FreeBSD/amd64 (14.0-CURRENT). --- dnssec_zone.c | 7 +++---- edns.c | 6 +++--- packet.c | 2 ++ rr.c | 4 ++++ str2host.c | 2 +- util.c | 2 ++ 6 files changed, 15 insertions(+), 8 deletions(-) diff --git a/dnssec_zone.c b/dnssec_zone.c index 7be6791e..013517f4 100644 --- a/dnssec_zone.c +++ b/dnssec_zone.c @@ -605,10 +605,6 @@ ldns_todo_nsec3_ents_node_free(ldns_rbnode_t *node, void *arg) { LDNS_FREE(node); } -ldns_status _ldns_rr_new_frm_fp_l_internal(ldns_rr **newrr, FILE *fp, - uint32_t *default_ttl, ldns_rdf **origin, ldns_rdf **prev, - int *line_nr, bool *explicit_ttl); - ldns_status ldns_dnssec_zone_new_frm_fp_l(ldns_dnssec_zone** z, FILE* fp, const ldns_rdf* origin, uint32_t default_ttl, ldns_rr_class ATTR_UNUSED(c), int* line_nr) @@ -1914,6 +1910,9 @@ rr_list2dnssec_rrs(ldns_rr_list *rr_list, ldns_dnssec_rrs **rrs, } +ldns_status +dnssec_zone_equip_zonemd(ldns_dnssec_zone *zone, + ldns_rr_list *new_rrs, ldns_key_list *key_list, int signflags); ldns_status dnssec_zone_equip_zonemd(ldns_dnssec_zone *zone, ldns_rr_list *new_rrs, ldns_key_list *key_list, int signflags) diff --git a/edns.c b/edns.c index 3d002d67..bc374835 100644 --- a/edns.c +++ b/edns.c @@ -73,21 +73,21 @@ ldns_edns_get_wireformat_buffer(const ldns_edns_option *edns) } /* write */ -void +static void ldns_edns_set_size(ldns_edns_option *edns, size_t size) { assert(edns != NULL); edns->_size = size; } -void +static void ldns_edns_set_code(ldns_edns_option *edns, ldns_edns_option_code code) { assert(edns != NULL); edns->_code = code; } -void +static void ldns_edns_set_data(ldns_edns_option *edns, void *data) { /* only copy the pointer */ diff --git a/packet.c b/packet.c index 4d68c234..059cc09b 100644 --- a/packet.c +++ b/packet.c @@ -758,6 +758,8 @@ ldns_pkt_edns(const ldns_pkt *pkt) ); } +ldns_edns_option_list* +pkt_edns_data2edns_option_list(const ldns_rdf *edns_data); ldns_edns_option_list* pkt_edns_data2edns_option_list(const ldns_rdf *edns_data) { diff --git a/rr.c b/rr.c index 95ab71d3..6167a7aa 100644 --- a/rr.c +++ b/rr.c @@ -721,6 +721,10 @@ ldns_rr_new_frm_fp(ldns_rr **newrr, FILE *fp, uint32_t *ttl, ldns_rdf **origin, return ldns_rr_new_frm_fp_l(newrr, fp, ttl, origin, prev, NULL); } +ldns_status +_ldns_rr_new_frm_fp_l_internal(ldns_rr **newrr, FILE *fp, + uint32_t *default_ttl, ldns_rdf **origin, ldns_rdf **prev, + int *line_nr, bool *explicit_ttl); ldns_status _ldns_rr_new_frm_fp_l_internal(ldns_rr **newrr, FILE *fp, uint32_t *default_ttl, ldns_rdf **origin, ldns_rdf **prev, diff --git a/str2host.c b/str2host.c index 5b78e5bc..4617aa3c 100644 --- a/str2host.c +++ b/str2host.c @@ -2198,7 +2198,7 @@ static const size_t svcparam_key_defs_len = sizeof(svcparam_key_defs) /* svcparam_key2buffer_str() should actually be in host2str.c, but we need the * svcparam_key_defs for it and it is not an exposed symbol anyway. */ -ldns_status svcparam_key2buffer_str(ldns_buffer *output, uint16_t key) +static ldns_status svcparam_key2buffer_str(ldns_buffer *output, uint16_t key) { if (key <= LDNS_SVCPARAM_KEY_LAST_KEY) ldns_buffer_write_string(output, svcparam_key_defs[key].str); diff --git a/util.c b/util.c index 807a99e2..662aa23a 100644 --- a/util.c +++ b/util.c @@ -317,6 +317,8 @@ ldns_serial_arithmetics_gmtime_r(int32_t time, time_t now, struct tm *result) #endif /* alias function because of previously used wrong spelling */ struct tm * +ldns_serial_arithmitics_gmtime_r(int32_t time, time_t now, struct tm *result); +struct tm * ldns_serial_arithmitics_gmtime_r(int32_t time, time_t now, struct tm *result) { return ldns_serial_arithmetics_gmtime_r(time, now, result); From bea9430b7765cc69d3f3ce9e61f6caae91e5ec51 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Thu, 25 May 2023 10:29:10 -0400 Subject: [PATCH 24/64] Update declaration for function with no arguments With -Wstrict-prototypes clang warns that "a function declaration without a prototype is deprecated in all versions of C." --- edns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edns.c b/edns.c index 3d002d67..aa4a3f29 100644 --- a/edns.c +++ b/edns.c @@ -167,7 +167,7 @@ ldns_edns_free(ldns_edns_option *edns) } ldns_edns_option_list* -ldns_edns_option_list_new() +ldns_edns_option_list_new(void) { ldns_edns_option_list *option_list = LDNS_MALLOC(ldns_edns_option_list); if(!option_list) { From 8d6745364652c923444269e75fb9bb85258309d4 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 2 Jun 2023 10:11:17 +0200 Subject: [PATCH 25/64] ldns-testns match on edns0 udp_size --- examples/ldns-testpkts.c | 14 ++++++++++++++ examples/ldns-testpkts.h | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/examples/ldns-testpkts.c b/examples/ldns-testpkts.c index 09b5c23b..c67a8259 100644 --- a/examples/ldns-testpkts.c +++ b/examples/ldns-testpkts.c @@ -130,6 +130,13 @@ static void matchline(char* line, struct entry* e) e->ixfr_soa_serial = (uint32_t)strtol(parse, (char**)&parse, 10); while(isspace((int)*parse)) parse++; + } else if(str_keyword(&parse, "udp_size")) { + if(*parse != '=' && *parse != ':') + error("expected = or : in MATCH: %s", line); + parse++; + e->match_udp_size = (uint32_t)strtol(parse, (char**)&parse, 10); + while(isspace((int)*parse)) + parse++; } else { error("could not parse MATCH: '%s'", parse); } @@ -243,6 +250,7 @@ static struct entry* new_entry(void) e->match_serial = false; e->ixfr_soa_serial = 0; e->match_transport = transport_any; + e->match_udp_size = 0; e->reply_list = NULL; e->copy_id = false; e->copy_query = false; @@ -795,6 +803,12 @@ find_match(struct entry* entries, ldns_pkt* query_pkt, verbose(3, "bad transport\n"); continue; } + if(p->match_udp_size > 0 && transport == transport_udp && ( + !ldns_pkt_edns(query_pkt) || + ldns_pkt_edns_udp_size(query_pkt) < p->match_udp_size)) { + verbose(3, "bad udp_size\n"); + continue; + } if(p->match_all && !match_all(query_pkt, reply, p->match_ttl)) { verbose(3, "bad allmatch\n"); continue; diff --git a/examples/ldns-testpkts.h b/examples/ldns-testpkts.h index 26a71dad..0a20d016 100644 --- a/examples/ldns-testpkts.h +++ b/examples/ldns-testpkts.h @@ -49,6 +49,9 @@ ; 'DO' will match only queries with DO bit set. ; 'noedns' matches queries without EDNS OPT records. ; 'ednsdata' matches queries to HEX_EDNS section. + ; 'udp_size=1232' makes the query match if: + ; udp_size in query edns0 field >= 1232, + ; or the query came over TCP. MATCH [opcode] [qtype] [qname] [serial=] [all] [ttl] MATCH [UDP|TCP] DO MATCH ... @@ -185,6 +188,8 @@ struct entry { uint32_t ixfr_soa_serial; /** match on UDP/TCP */ enum transport_type match_transport; + /** match on edns udp size (larger or equal) */ + uint16_t match_udp_size; /** pre canned reply */ struct reply_packet *reply_list; From 67b9f0ae98910df882ca77f503673929a9e1db9b Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Sat, 3 Jun 2023 15:08:41 +0200 Subject: [PATCH 26/64] ldns-testns match wildcard qname's Currently only in combination with copy_query (for simulating delegations) --- examples/ldns-testpkts.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/ldns-testpkts.c b/examples/ldns-testpkts.c index c67a8259..033b9601 100644 --- a/examples/ldns-testpkts.c +++ b/examples/ldns-testpkts.c @@ -764,9 +764,13 @@ find_match(struct entry* entries, ldns_pkt* query_pkt, continue; } if(p->match_qname) { - if(!get_owner(query_pkt) || !get_owner(reply) || - ldns_dname_compare( - get_owner(query_pkt), get_owner(reply)) != 0) { + if (!get_owner(query_pkt) || !get_owner(reply) + || ( !p->copy_query + && ldns_dname_compare( get_owner(query_pkt) + , get_owner(reply))) + || ( p->copy_query + && !ldns_dname_match_wildcard( get_owner(query_pkt) + , get_owner(reply)))) { verbose(3, "bad qname\n"); continue; } From d9549292b613e598d65a029440fa3154ccd14459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98rjan=20Malde?= Date: Thu, 14 Sep 2023 16:36:00 +0200 Subject: [PATCH 27/64] progs: don't underlink to libldns --- Makefile.in | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile.in b/Makefile.in index c793dd2a..e2b85ce1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -27,6 +27,7 @@ pyldnsx_inst = @PYLDNSXINST@ pyldnsx_uninst = @PYLDNSXUNINST@ libtool = @libtool@ CONFIG_FILES = @CONFIG_FILES@ +top_builddir = @top_builddir@ LDNS_TRUST_ANCHOR_FILE = @LDNS_TRUST_ANCHOR_FILE@ DEFAULT_CAFILE = @DEFAULT_CAFILE@ @@ -168,7 +169,7 @@ no-drill-config-h: fi drill/drill: $(DRILL_LOBJS) $(LIB) $(LIBLOBJS) - $(LINK_EXE) $(DRILL_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o drill/drill + $(LINK_EXE) $(DRILL_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o drill/drill $(top_builddir)/libldns.la drill/drill.1: $(srcdir)/drill/drill.1.in $(edit) $(srcdir)/drill/drill.1.in > drill/drill.1 @@ -200,23 +201,23 @@ no-examples-config-h: # Need LIBSSL_LIBS $(EXAMPLE_PROGS): - $(LINK_EXE) $@.lo $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $@ + $(LINK_EXE) $@.lo $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $@ $(top_builddir)/libldns.la # Need LIBSSL_LIBS $(TESTNS): - $(LINK_EXE) $(TESTNS_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $(TESTNS) + $(LINK_EXE) $(TESTNS_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $(TESTNS) $(top_builddir)/libldns.la # Need LIBSSL_LIBS $(LDNS_DPA): $(LINK_EXE) $(LDNS_DPA_LOBJS) $(LIBLOBJS) $(LIB) $(LIBPCAP_LIBS) $(LIBSSL_LIBS) $(LIBS) \ - -o $(LDNS_DPA) + -o $(LDNS_DPA) $(top_builddir)/libldns.la $(LDNS_DANE): $(LINK_EXE) $(LDNS_DANE_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_SSL_LIBS) $(LIBS) \ - -o $(LDNS_DANE) + -o $(LDNS_DANE) $(top_builddir)/libldns.la $(EX_SSL_PROGS): - $(LINK_EXE) $@.lo $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $@ + $(LINK_EXE) $@.lo $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $@ $(top_builddir)/libldns.la examples/ldns-dane.1: $(srcdir)/examples/ldns-dane.1.in $(edit) $(srcdir)/examples/ldns-dane.1.in > examples/ldns-dane.1 @@ -251,7 +252,7 @@ clean-examples: linktest: $(srcdir)/linktest.c libldns.la $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/linktest.c -o linktest.lo - $(LINK_EXE) linktest.lo $(LIB) $(LIBSSL_LIBS) $(LIBS) -o linktest + $(LINK_EXE) linktest.lo $(LIB) $(LIBSSL_LIBS) $(LIBS) -o linktest $(top_builddir)/libldns.la lib: libldns.la From c9d396aac198cf7ac191b5571ea3b52b4fb3a9b8 Mon Sep 17 00:00:00 2001 From: Jeroen Koekkoek Date: Fri, 22 Sep 2023 16:43:18 +0200 Subject: [PATCH 28/64] Update email addresses --- configure.ac | 2 +- doc/doxyparse.pl | 5 ++--- drill/drill.1.in | 2 +- drill/drill.c | 2 +- examples/ldns-chaos.1 | 2 +- examples/ldns-dane.1.in | 2 +- examples/ldns-dpa.1 | 2 +- examples/ldns-gen-zone.1 | 2 +- examples/ldns-key2ds.1 | 2 +- examples/ldns-keyfetcher.1 | 2 +- examples/ldns-keygen.1 | 2 +- examples/ldns-mx.1 | 2 +- examples/ldns-notify.1 | 2 +- examples/ldns-notify.c | 2 +- examples/ldns-nsec3-hash.1 | 2 +- examples/ldns-read-zone.1 | 2 +- examples/ldns-resolver.1 | 2 +- examples/ldns-revoke.1 | 2 +- examples/ldns-rrsig.1 | 2 +- examples/ldns-signzone.1 | 2 +- examples/ldns-test-edns.1 | 2 +- examples/ldns-testns.1 | 2 +- examples/ldns-update.1 | 2 +- examples/ldns-verify-zone.1.in | 2 +- examples/ldns-version.1 | 2 +- examples/ldns-walk.1 | 2 +- examples/ldns-zcat.1 | 2 +- examples/ldns-zsplit.1 | 2 +- examples/ldnsd.1 | 2 +- examples/nsd-test/configure.ac | 2 +- lua/configure.ac | 2 +- packaging/ldns-config.1 | 2 +- pcat/configure.ac | 2 +- pcat/pcat-diff.1 | 2 +- pcat/pcat-print.1 | 2 +- pcat/pcat.1 | 2 +- .../12-unit-tests-dnssec.configure.ac | 2 +- test/13-unit-tests-base.tpkg/13-unit-tests-base.configure.ac | 2 +- .../15-unit-tests-rrtypes.configure.ac | 2 +- test/16-unit-tests-edns.tpkg/16-unit-tests-edns.configure.ac | 2 +- 40 files changed, 41 insertions(+), 42 deletions(-) diff --git a/configure.ac b/configure.ac index 20b7aba1..ff76665c 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ sinclude(acx_nlnetlabs.m4) m4_define([VERSION_MAJOR],[1]) m4_define([VERSION_MINOR],[8]) m4_define([VERSION_MICRO],[3]) -AC_INIT(ldns, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), libdns@nlnetlabs.nl, libdns) +AC_INIT(ldns, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), dns-team@nlnetlabs.nl, libdns) AC_CONFIG_SRCDIR([packet.c]) # needed to build correct soname AC_SUBST(LDNS_VERSION_MAJOR, [VERSION_MAJOR]) diff --git a/doc/doxyparse.pl b/doc/doxyparse.pl index 79da2df0..a66340e1 100755 --- a/doc/doxyparse.pl +++ b/doc/doxyparse.pl @@ -40,9 +40,8 @@ The ldns team at NLnet Labs. .SH REPORTING BUGS -Please report bugs to ldns-team\@nlnetlabs.nl or in -our bugzilla at -http://www.nlnetlabs.nl/bugs/index.html +Please report bugs to dns-team\@nlnetlabs.nl or on +GitHub at https://github.com/NLnetLabs/ldns/issues .SH COPYRIGHT Copyright (c) 2004 - 2006 NLnet Labs. diff --git a/drill/drill.1.in b/drill/drill.1.in index f2494243..dcc7a71a 100644 --- a/drill/drill.1.in +++ b/drill/drill.1.in @@ -249,7 +249,7 @@ unbound-anchor(8) Jelte Jansen and Miek Gieben. Both of NLnet Labs. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH BUGS diff --git a/drill/drill.c b/drill/drill.c index 611c81f3..44c1b768 100644 --- a/drill/drill.c +++ b/drill/drill.c @@ -82,7 +82,7 @@ usage(FILE *stream, const char *progname) fprintf(stream, "\t-z\t\tdon't randomize the nameservers before use\n"); fprintf(stream, "\n [*] = enables/implies DNSSEC\n"); fprintf(stream, " [**] = can be given more than once\n"); - fprintf(stream, "\n ldns-team@nlnetlabs.nl | http://www.nlnetlabs.nl/ldns/\n"); + fprintf(stream, "\n dns-team@nlnetlabs.nl | http://www.nlnetlabs.nl/ldns/\n"); } /** diff --git a/examples/ldns-chaos.1 b/examples/ldns-chaos.1 index e9b7bf46..6cb7a94c 100644 --- a/examples/ldns-chaos.1 +++ b/examples/ldns-chaos.1 @@ -18,7 +18,7 @@ each address for its \fIversion.bind\fR and \fIhostname.bind\fR. Written by the ldns team as an example for ldns usage. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2005 NLnet Labs. This is free software. There is NO diff --git a/examples/ldns-dane.1.in b/examples/ldns-dane.1.in index a3d83a22..e87c27c2 100644 --- a/examples/ldns-dane.1.in +++ b/examples/ldns-dane.1.in @@ -170,7 +170,7 @@ unbound-anchor(8) Written by the ldns team as an example for ldns usage. .SH REPORTING BUGS -Report bugs to \fIldns-team@nlnetlabs.nl\fR. +Report bugs to . .SH COPYRIGHT Copyright (C) 2012 NLnet Labs. This is free software. There is NO diff --git a/examples/ldns-dpa.1 b/examples/ldns-dpa.1 index 6ff9eb32..c3239f0c 100644 --- a/examples/ldns-dpa.1 +++ b/examples/ldns-dpa.1 @@ -143,7 +143,7 @@ Print all query packets seen on the specified interface. Written by Jelte Jansen for NLnetLabs. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2005 NLnet Labs. This is free software. There is NO diff --git a/examples/ldns-gen-zone.1 b/examples/ldns-gen-zone.1 index 0e5a0dc6..db6bca63 100644 --- a/examples/ldns-gen-zone.1 +++ b/examples/ldns-gen-zone.1 @@ -77,7 +77,7 @@ Initially written by Marco Davids, several modifications added by Miek Gieben, both from SIDN. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH BUGS Only undiscovered ones. diff --git a/examples/ldns-key2ds.1 b/examples/ldns-key2ds.1 index 5571777d..6225eef5 100644 --- a/examples/ldns-key2ds.1 +++ b/examples/ldns-key2ds.1 @@ -44,7 +44,7 @@ Use SHA384 as the hash function Written by the ldns team as an example for ldns usage. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2005 NLnet Labs. This is free software. There is NO diff --git a/examples/ldns-keyfetcher.1 b/examples/ldns-keyfetcher.1 index 6ddc14ea..13931fb6 100644 --- a/examples/ldns-keyfetcher.1 +++ b/examples/ldns-keyfetcher.1 @@ -56,7 +56,7 @@ The filenames will be of the format K.+.+.key Written by Jelte Jansen for NLnet Labs. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2006 NLnet Labs. This is free software. There is NO diff --git a/examples/ldns-keygen.1 b/examples/ldns-keygen.1 index 4bb9fec2..7e52a60b 100644 --- a/examples/ldns-keygen.1 +++ b/examples/ldns-keygen.1 @@ -61,7 +61,7 @@ Show the version and exit Written by the ldns team as an example for ldns usage. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2005-2008 NLnet Labs. This is free software. There is NO diff --git a/examples/ldns-mx.1 b/examples/ldns-mx.1 index cad97abc..ec110cba 100644 --- a/examples/ldns-mx.1 +++ b/examples/ldns-mx.1 @@ -15,7 +15,7 @@ ldns-mx \- print out the mx record(s) for a domain Written by the ldns team as an example for ldns usage. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2005 NLnet Labs. This is free software. There is NO diff --git a/examples/ldns-notify.1 b/examples/ldns-notify.1 index c7fbb6f7..b77b0d4b 100644 --- a/examples/ldns-notify.1 +++ b/examples/ldns-notify.1 @@ -62,7 +62,7 @@ acknowledgement to the notify message, and a failure exit code otherwise. Written by the ldns team as an example for ldns usage. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2005 NLnet Labs. This is free software. There is NO diff --git a/examples/ldns-notify.c b/examples/ldns-notify.c index bfd12384..0c4f68df 100644 --- a/examples/ldns-notify.c +++ b/examples/ldns-notify.c @@ -39,7 +39,7 @@ usage(void) fprintf(stderr, "\t-r num\t\tmax number of retries (%d)\n", max_num_retry); fprintf(stderr, "\t-h\t\tPrint this help information\n\n"); - fprintf(stderr, "Report bugs to \n"); + fprintf(stderr, "Report bugs to \n"); exit(1); } diff --git a/examples/ldns-nsec3-hash.1 b/examples/ldns-nsec3-hash.1 index 1b0f70ce..9fd5bd5f 100644 --- a/examples/ldns-nsec3-hash.1 +++ b/examples/ldns-nsec3-hash.1 @@ -26,7 +26,7 @@ Use count iterations for the hash calculation. Written by the ldns team as an example for ldns usage. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2008 NLnet Labs. This is free software. There is NO diff --git a/examples/ldns-read-zone.1 b/examples/ldns-read-zone.1 index 18c9f6db..11ecad71 100644 --- a/examples/ldns-read-zone.1 +++ b/examples/ldns-read-zone.1 @@ -105,7 +105,7 @@ Sort the zone before printing (this implies \-c) Written by the ldns team as an example for ldns usage. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2005 NLnet Labs. This is free software. There is NO diff --git a/examples/ldns-resolver.1 b/examples/ldns-resolver.1 index 23926068..de7c2593 100644 --- a/examples/ldns-resolver.1 +++ b/examples/ldns-resolver.1 @@ -18,7 +18,7 @@ be parsed successfully. Written by the ldns team as an example for ldns usage. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2005 NLnet Labs. This is free software. There is NO diff --git a/examples/ldns-revoke.1 b/examples/ldns-revoke.1 index 5a16244d..3a8ee4b1 100644 --- a/examples/ldns-revoke.1 +++ b/examples/ldns-revoke.1 @@ -19,7 +19,7 @@ Write the result to stdout instead of a file Written by the ldns team as an example for ldns usage. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2008 NLnet Labs. This is free software. There is NO diff --git a/examples/ldns-rrsig.1 b/examples/ldns-rrsig.1 index d64b9f3b..8262e3d4 100644 --- a/examples/ldns-rrsig.1 +++ b/examples/ldns-rrsig.1 @@ -22,7 +22,7 @@ If the second argument \fBtype\fR is given the RRSIG covering that type will be Written by the ldns team as an example for ldns usage. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2005 NLnet Labs. This is free software. There is NO diff --git a/examples/ldns-signzone.1 b/examples/ldns-signzone.1 index 68f9f773..b1cdeebf 100644 --- a/examples/ldns-signzone.1 +++ b/examples/ldns-signzone.1 @@ -186,7 +186,7 @@ Written by the ldns team as an example for ldns usage. Portions of engine support by Vadim Penzin . .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2005-2008 NLnet Labs. This is free software. There is NO diff --git a/examples/ldns-test-edns.1 b/examples/ldns-test-edns.1 index 2659ccc4..5f703d7c 100644 --- a/examples/ldns-test-edns.1 +++ b/examples/ldns-test-edns.1 @@ -34,7 +34,7 @@ IP address: 0 is OK, 1 is failure, 2 is some sort of network failure. .SH AUTHOR Written by the ldns team as an example for ldns usage. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2010 NLnet Labs. This is free software. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR diff --git a/examples/ldns-testns.1 b/examples/ldns-testns.1 index f1e1f511..4164690b 100644 --- a/examples/ldns-testns.1 +++ b/examples/ldns-testns.1 @@ -128,7 +128,7 @@ ENTRY_END .SH AUTHOR Written by the ldns team as an example for ldns usage, and for testing purposes. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2006-2008 NLnet Labs. This is free software. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR diff --git a/examples/ldns-update.1 b/examples/ldns-update.1 index f36b2683..4b1a8b33 100644 --- a/examples/ldns-update.1 +++ b/examples/ldns-update.1 @@ -44,7 +44,7 @@ ldns-update my.example.org 1.2.3.4 Written by Jakob Schlyter and Håkan Olsson, as an addition to the ldns library from NLnet Labs. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2005 NLnet Labs. This is free software. There is NO diff --git a/examples/ldns-verify-zone.1.in b/examples/ldns-verify-zone.1.in index c37cb791..6bea57f0 100644 --- a/examples/ldns-verify-zone.1.in +++ b/examples/ldns-verify-zone.1.in @@ -107,7 +107,7 @@ unbound-anchor(8) Written by the ldns team as an example for ldns usage. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2008 NLnet Labs. This is free software. There is NO diff --git a/examples/ldns-version.1 b/examples/ldns-version.1 index bf409a30..102e5d35 100644 --- a/examples/ldns-version.1 +++ b/examples/ldns-version.1 @@ -14,7 +14,7 @@ ldns-version \- print out the version of the ldns-library and tools on this syst Written by the ldns team as an example for ldns usage. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2005 NLnet Labs. This is free software. There is NO diff --git a/examples/ldns-walk.1 b/examples/ldns-walk.1 index d4d1b6e7..0523b0da 100644 --- a/examples/ldns-walk.1 +++ b/examples/ldns-walk.1 @@ -53,7 +53,7 @@ The full zone walk function is not complete yet, it does not correctly print del Written by Jelte Jansen as an example for ldns usage. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2005 NLnet Labs. This is free software. There is NO diff --git a/examples/ldns-zcat.1 b/examples/ldns-zcat.1 index 4fd7ba6d..0c33c466 100644 --- a/examples/ldns-zcat.1 +++ b/examples/ldns-zcat.1 @@ -26,7 +26,7 @@ show the version number and exit Written by the ldns team as an example for ldns usage. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2005, 2006 NLnet Labs. This is free software. There is NO diff --git a/examples/ldns-zsplit.1 b/examples/ldns-zsplit.1 index 02dce404..be110b5b 100644 --- a/examples/ldns-zsplit.1 +++ b/examples/ldns-zsplit.1 @@ -35,7 +35,7 @@ Show version number and exit. Written by the ldns team as an example for ldns usage. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2005, 2006 NLnet Labs. This is free software. There is NO diff --git a/examples/ldnsd.1 b/examples/ldnsd.1 index 5b18058a..2036b67d 100644 --- a/examples/ldnsd.1 +++ b/examples/ldnsd.1 @@ -18,7 +18,7 @@ This is NOT a full-fledged authoritative nameserver! Written by the ldns team as an example for ldns usage. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2005 NLnet Labs. This is free software. There is NO diff --git a/examples/nsd-test/configure.ac b/examples/nsd-test/configure.ac index 5cd62ca6..05c7bf83 100644 --- a/examples/nsd-test/configure.ac +++ b/examples/nsd-test/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT(ldns, 1.7.0, libdns@nlnetlabs.nl,libdns) +AC_INIT(ldns, 1.7.0, dns-team@nlnetlabs.nl,libdns) AC_CONFIG_SRCDIR([nsd-ldnsd.c]) OURCPPFLAGS='-D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ -D__BSD_VISIBLE' diff --git a/lua/configure.ac b/lua/configure.ac index c31ec46f..72ae88c6 100644 --- a/lua/configure.ac +++ b/lua/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT(ldns-tests, 1.7.0, libdns@nlnetlabs.nl, ldns-tests-1.0) +AC_INIT(ldns-tests, 1.7.0, dns-team@nlnetlabs.nl, ldns-tests-1.0) AC_CONFIG_SRCDIR([../ldns/config.h]) AC_AIX diff --git a/packaging/ldns-config.1 b/packaging/ldns-config.1 index 72afc189..37df20a4 100644 --- a/packaging/ldns-config.1 +++ b/packaging/ldns-config.1 @@ -38,7 +38,7 @@ Show \fBldns-config\fR usage description Written by the ldns team. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2011 NLnet Labs. This is free software. There is NO diff --git a/pcat/configure.ac b/pcat/configure.ac index 61c68f73..090610ae 100644 --- a/pcat/configure.ac +++ b/pcat/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT(pcat, 1.7.0, libdns@nlnetlabs.nl,pcat) +AC_INIT(pcat, 1.7.0, dns-team@nlnetlabs.nl,pcat) AC_CONFIG_SRCDIR([pcat.c]) OURCPPFLAGS='' diff --git a/pcat/pcat-diff.1 b/pcat/pcat-diff.1 index c390b959..3f5a5a8d 100644 --- a/pcat/pcat-diff.1 +++ b/pcat/pcat-diff.1 @@ -174,7 +174,7 @@ Also see pcat(1) and pcat-print(1). Written by Miek Gieben for NLnet Labs. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2005, 2006 NLnet Labs. This is free software. There is NO diff --git a/pcat/pcat-print.1 b/pcat/pcat-print.1 index 2a11aeb6..7fd94746 100644 --- a/pcat/pcat-print.1 +++ b/pcat/pcat-print.1 @@ -51,7 +51,7 @@ Also see pcat(1) and pcat-diff(1). Written by Miek Gieben for NLnet Labs. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2005, 2006 NLnet Labs. This is free software. There is NO diff --git a/pcat/pcat.1 b/pcat/pcat.1 index e69609c4..897fa954 100644 --- a/pcat/pcat.1 +++ b/pcat/pcat.1 @@ -49,7 +49,7 @@ Also see pcat-print(1) and pcat-diff(1). Written by Miek Gieben for NLnet Labs. .SH REPORTING BUGS -Report bugs to . +Report bugs to . .SH COPYRIGHT Copyright (C) 2005, 2006 NLnet Labs. This is free software. There is NO diff --git a/test/12-unit-tests-dnssec.tpkg/12-unit-tests-dnssec.configure.ac b/test/12-unit-tests-dnssec.tpkg/12-unit-tests-dnssec.configure.ac index 62100464..e0313899 100644 --- a/test/12-unit-tests-dnssec.tpkg/12-unit-tests-dnssec.configure.ac +++ b/test/12-unit-tests-dnssec.tpkg/12-unit-tests-dnssec.configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT(libdns, 1.1.0, libdns@nlnetlabs.nl,libdns) +AC_INIT(libdns, 1.1.0, dns-team@nlnetlabs.nl,libdns) AC_CONFIG_SRCDIR([12-unit-tests-dnssec.c]) OURCPPFLAGS='' diff --git a/test/13-unit-tests-base.tpkg/13-unit-tests-base.configure.ac b/test/13-unit-tests-base.tpkg/13-unit-tests-base.configure.ac index 47a0f337..5b3be289 100644 --- a/test/13-unit-tests-base.tpkg/13-unit-tests-base.configure.ac +++ b/test/13-unit-tests-base.tpkg/13-unit-tests-base.configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT(drill, 1.1.0, ldns-team@nlnetlabs.nl, ldns-team) +AC_INIT(drill, 1.1.0, dns-team@nlnetlabs.nl, ldns-team) AC_CONFIG_SRCDIR([13-unit-tests-base.c]) AC_AIX diff --git a/test/15-unit-tests-rrtypes.tpkg/15-unit-tests-rrtypes.configure.ac b/test/15-unit-tests-rrtypes.tpkg/15-unit-tests-rrtypes.configure.ac index 77398d7e..9286e12c 100644 --- a/test/15-unit-tests-rrtypes.tpkg/15-unit-tests-rrtypes.configure.ac +++ b/test/15-unit-tests-rrtypes.tpkg/15-unit-tests-rrtypes.configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT(libdns, 1.1.0, libdns@nlnetlabs.nl,libdns) +AC_INIT(libdns, 1.1.0, dns-team@nlnetlabs.nl,libdns) AC_CONFIG_SRCDIR([15-unit-tests-rrtypes.c]) OURCPPFLAGS='' diff --git a/test/16-unit-tests-edns.tpkg/16-unit-tests-edns.configure.ac b/test/16-unit-tests-edns.tpkg/16-unit-tests-edns.configure.ac index 47a0f337..5b3be289 100644 --- a/test/16-unit-tests-edns.tpkg/16-unit-tests-edns.configure.ac +++ b/test/16-unit-tests-edns.tpkg/16-unit-tests-edns.configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT(drill, 1.1.0, ldns-team@nlnetlabs.nl, ldns-team) +AC_INIT(drill, 1.1.0, dns-team@nlnetlabs.nl, ldns-team) AC_CONFIG_SRCDIR([13-unit-tests-base.c]) AC_AIX From 681cb309620e44d3d4d96494554e19bcab0b6f9d Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sun, 26 Nov 2023 23:38:14 +0100 Subject: [PATCH 29/64] keys.c: fix build with libressl >= 3.8.1 libressl >= 3.8.1 removed ENGINE support: "ENGINE support was removed and OPENSSL_NO_ENGINE is set. In spite of this, some stub functions are provided to avoid patching some applications that do not honor OPENSSL_NO_ENGINE." resulting in the following build failure with gost: ./keys.c:167:35: error: 'ENGINE_METHOD_ALL' undeclared (first use in this function) 167 | if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) { | ^~~~~~~~~~~~~~~~~ Fixes: - http://autobuild.buildroot.org/results/37cc05b78a7004caa1b45d896121f059a4f8ca00 Signed-off-by: Fabrice Fontaine --- keys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keys.c b/keys.c index 78bea972..59de186e 100644 --- a/keys.c +++ b/keys.c @@ -132,7 +132,7 @@ ldns_key_new_frm_engine(ldns_key **key, ENGINE *e, char *key_id, ldns_algorithm } #endif -#ifdef USE_GOST +#if defined(USE_GOST) && !defined(OPENSSL_NO_ENGINE) /** store GOST engine reference loaded into OpenSSL library */ ENGINE* ldns_gost_engine = NULL; From aebeb3377a9013c02a27e416b5900768cc9360a6 Mon Sep 17 00:00:00 2001 From: dogo42 Date: Sat, 9 Dec 2023 11:10:30 +0000 Subject: [PATCH 30/64] python3 bindings: class resolver fix Imitating the example in the beginning of ldnsx.py results in error: host:~/rpmbuild# python Python 3.9.16 (main, Dec 8 2022, 00:00:00) [GCC 11.3.1 20221121 (Red Hat 11.3.1-4)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ldnsx >>> dir(ldnsx) ['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', '__version__', '_rr_types', 'calendar', 'get_rrs', 'isValidIP', 'ldns', 'packet', 'query', 'resolver', 'resource_record', 'secure_query', 'socket', 'sys', 'time', 'warnings'] >>> ldnsx.resolver("9.9.9.9").query("www.hole.fi", "A") Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.9/site-packages/ldnsx.py", line 220, in __init__ nm_list.reverse() AttributeError: 'filter' object has no attribute 'reverse' >>> This patch fixes it, i.e. just add list( .. ) around the filter lambda. --- contrib/ldnsx/ldnsx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ldnsx/ldnsx.py b/contrib/ldnsx/ldnsx.py index e2bd0e51..57400cff 100644 --- a/contrib/ldnsx/ldnsx.py +++ b/contrib/ldnsx/ldnsx.py @@ -216,7 +216,7 @@ def __init__(self, ns = None, dnssec = False, tcp = False, port = 53): self.drop_nameservers() nm_list = ns.split(',') nm_list = map(lambda s: s.strip(), nm_list) - nm_list = filter(lambda s: s != "", nm_list) + nm_list = list(filter(lambda s: s != "", nm_list)) nm_list.reverse() for nm in nm_list: self.add_nameserver(nm) From 46fa15db56787c95200d3455a2c6e52df5b8f6ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Thu, 4 Jan 2024 10:02:11 +0100 Subject: [PATCH 31/64] Update address of b.root-servers.net and some others Update recently changed root servers address in the drill tool. Update also other addresses and expand IPv6 addresses. --- drill/root.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/drill/root.c b/drill/root.c index a829935c..87050944 100644 --- a/drill/root.c +++ b/drill/root.c @@ -28,26 +28,38 @@ init_root(void) ldns_rr_list_push_rr(global_dns_root, r); (void)ldns_rr_new_frm_str(&r, "A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:BA3E::2:30", 0, NULL, NULL); ldns_rr_list_push_rr(global_dns_root, r); - (void)ldns_rr_new_frm_str(&r, "B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201", 0, NULL, NULL); + (void)ldns_rr_new_frm_str(&r, "B.ROOT-SERVERS.NET. 3600000 A 170.247.170.2", 0, NULL, NULL); + ldns_rr_list_push_rr(global_dns_root, r); + (void)ldns_rr_new_frm_str(&r, "B.ROOT-SERVERS.NET. 3600000 AAAA 2801:1b8:10::B", 0, NULL, NULL); ldns_rr_list_push_rr(global_dns_root, r); (void)ldns_rr_new_frm_str(&r, "C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12", 0, NULL, NULL); ldns_rr_list_push_rr(global_dns_root, r); - (void)ldns_rr_new_frm_str(&r, "D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90", 0, NULL, NULL); + (void)ldns_rr_new_frm_str(&r, "C.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2::C", 0, NULL, NULL); + ldns_rr_list_push_rr(global_dns_root, r); + (void)ldns_rr_new_frm_str(&r, "D.ROOT-SERVERS.NET. 3600000 A 199.7.91.13", 0, NULL, NULL); + ldns_rr_list_push_rr(global_dns_root, r); + (void)ldns_rr_new_frm_str(&r, "D.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2D::D", 0, NULL, NULL); ldns_rr_list_push_rr(global_dns_root, r); (void)ldns_rr_new_frm_str(&r, "E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10", 0, NULL, NULL); ldns_rr_list_push_rr(global_dns_root, r); + (void)ldns_rr_new_frm_str(&r, "E.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:A8::E", 0, NULL, NULL); + ldns_rr_list_push_rr(global_dns_root, r); (void)ldns_rr_new_frm_str(&r, "F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241", 0, NULL, NULL); ldns_rr_list_push_rr(global_dns_root, r); (void)ldns_rr_new_frm_str(&r, "F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2F::F", 0, NULL, NULL); ldns_rr_list_push_rr(global_dns_root, r); (void)ldns_rr_new_frm_str(&r, "G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4", 0, NULL, NULL); ldns_rr_list_push_rr(global_dns_root, r); - (void)ldns_rr_new_frm_str(&r, "H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53", 0, NULL, NULL); + (void)ldns_rr_new_frm_str(&r, "G.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:12::D0D", 0, NULL, NULL); + ldns_rr_list_push_rr(global_dns_root, r); + (void)ldns_rr_new_frm_str(&r, "H.ROOT-SERVERS.NET. 3600000 A 198.97.190.53", 0, NULL, NULL); ldns_rr_list_push_rr(global_dns_root, r); - (void)ldns_rr_new_frm_str(&r, "H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::803F:235", 0, NULL, NULL); + (void)ldns_rr_new_frm_str(&r, "H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::53", 0, NULL, NULL); ldns_rr_list_push_rr(global_dns_root, r); (void)ldns_rr_new_frm_str(&r, "I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17", 0, NULL, NULL); ldns_rr_list_push_rr(global_dns_root, r); + (void)ldns_rr_new_frm_str(&r, "I.ROOT-SERVERS.NET. 3600000 AAAA 2001:7FE::53", 0, NULL, NULL); + ldns_rr_list_push_rr(global_dns_root, r); (void)ldns_rr_new_frm_str(&r, "J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30", 0, NULL, NULL); ldns_rr_list_push_rr(global_dns_root, r); (void)ldns_rr_new_frm_str(&r, "J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:C27::2:30", 0, NULL, NULL); @@ -58,7 +70,7 @@ init_root(void) ldns_rr_list_push_rr(global_dns_root, r); (void)ldns_rr_new_frm_str(&r, "L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42", 0, NULL, NULL); ldns_rr_list_push_rr(global_dns_root, r); - (void)ldns_rr_new_frm_str(&r, "L.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:3::42 ", 0, NULL, NULL); + (void)ldns_rr_new_frm_str(&r, "L.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:9F::42", 0, NULL, NULL); ldns_rr_list_push_rr(global_dns_root, r); (void)ldns_rr_new_frm_str(&r, "M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33", 0, NULL, NULL); ldns_rr_list_push_rr(global_dns_root, r); From 40a946995c0b8e4efebdc51dc88e320ce72b104f Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 6 Jan 2024 15:02:39 +0000 Subject: [PATCH 32/64] const ldns_rdf * typemap fixes to support swig-4.2.0 SWIG_Python_str_AsChar needs to be replaced by SWIG_PyUnicode_AsUTF8AndSize See https://github.com/swig/swig/commit/f89dd59d4b82ece899087682fdb86e94d2611513 --- contrib/python/ldns_rdf.i | 46 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/contrib/python/ldns_rdf.i b/contrib/python/ldns_rdf.i index 5d7448fd..4924b979 100644 --- a/contrib/python/ldns_rdf.i +++ b/contrib/python/ldns_rdf.i @@ -50,6 +50,7 @@ SWIGTYPE_p_ldns_struct_rdf, SWIG_POINTER_OWN | 0)); } +#if SWIG_VERSION < 0x040200 /* * Automatic conversion of const (ldns_rdf *) parameter from string. * Argument default value. @@ -96,6 +97,51 @@ } } +#else +/* + * Automatic conversion of const (ldns_rdf *) parameter from string. + * Argument default value. + */ +%typemap(arginit, noblock=1) const ldns_rdf * +{ + PyObject *$1_bytes = NULL; +} + +/* + * Automatic conversion of const (ldns_rdf *) parameter from string. + * Preparation of arguments. + */ +%typemap(in, noblock=1) const ldns_rdf * (void* argp, $1_ltype tmp = 0, int res) +{ + if (Python_str_Check($input)) { + const char *$1_str = SWIG_PyUnicode_AsUTF8AndSize($input, NULL, &$1_bytes); + if ($1_str == NULL) { + %argument_fail(SWIG_TypeError, "char *", $symname, $argnum); + } + tmp = ldns_dname_new_frm_str($1_str); + if (tmp == NULL) { + %argument_fail(SWIG_TypeError, "char *", $symname, $argnum); + } + $1 = ($1_ltype) tmp; + } else { + res = SWIG_ConvertPtr($input, &argp, SWIGTYPE_p_ldns_struct_rdf, 0 | 0); + if (!SWIG_IsOK(res)) { + %argument_fail(res, "ldns_rdf const *", $symname, $argnum); + } + $1 = ($1_ltype) argp; + } +} + +/* + * Automatic conversion of const (ldns_rdf *) parameter from string. + * Freeing of allocated memory (it's a no op unless compiling for some older versions of the Python stable ABI). + */ +%typemap(freearg, noblock=1) const ldns_rdf * +{ + Py_XDECREF($1_bytes); +} +#endif + %nodefaultctor ldns_struct_rdf; /* No default constructor. */ %nodefaultdtor ldns_struct_rdf; /* No default destructor. */ From daf38095763f758c77be538da25c267dc5cb73c8 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 26 Jan 2024 11:30:39 +0100 Subject: [PATCH 33/64] SWIG_Python_str_AsChar removal in SWIG 4.2.0 The replacement, SWIG_PyUnicode_AsUTF8AndSize, has different memory management requirements. --- contrib/python/ldns_rdf.i | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/contrib/python/ldns_rdf.i b/contrib/python/ldns_rdf.i index 5d7448fd..60daf1a7 100644 --- a/contrib/python/ldns_rdf.i +++ b/contrib/python/ldns_rdf.i @@ -56,7 +56,11 @@ */ %typemap(arginit, noblock=1) const ldns_rdf * { +#if SWIG_VERSION >= 0x040200 + PyObject *$1_bytes = NULL; +#else char *$1_str = NULL; +#endif } /* @@ -66,11 +70,17 @@ %typemap(in, noblock=1) const ldns_rdf * (void* argp, $1_ltype tmp = 0, int res) { if (Python_str_Check($input)) { + const char *argstr; +#if SWIG_VERSION >= 0x040200 + argstr = SWIG_PyUnicode_AsUTF8AndSize($input, NULL, &$1_bytes); +#else $1_str = SWIG_Python_str_AsChar($input); - if ($1_str == NULL) { + argstr = $1_str; +#endif + if (argstr == NULL) { %argument_fail(SWIG_TypeError, "char *", $symname, $argnum); } - tmp = ldns_dname_new_frm_str($1_str); + tmp = ldns_dname_new_frm_str(argstr); if (tmp == NULL) { %argument_fail(SWIG_TypeError, "char *", $symname, $argnum); } @@ -90,10 +100,17 @@ */ %typemap(freearg, noblock=1) const ldns_rdf * { +#if SWIG_VERSION >= 0x040200 + if ($1_bytes != NULL) { + /* Is not NULL only when a conversion form string occurred. */ + Py_XDECREF($1_bytes); + } +#else if ($1_str != NULL) { /* Is not NULL only when a conversion form string occurred. */ SWIG_Python_str_DelForPy3($1_str); /* Is a empty macro for Python < 3. */ } +#endif } %nodefaultctor ldns_struct_rdf; /* No default constructor. */ From f91f61e10be595a6a46845112aaed7da24551bf9 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 26 Jan 2024 11:57:03 +0100 Subject: [PATCH 34/64] 32-bit compatibility for Python SWIG bindings The ssize_t type can be int instead of long, and the pointer types are incompatible. --- contrib/python/ldns.i | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/python/ldns.i b/contrib/python/ldns.i index 881ba5e8..b4a74082 100644 --- a/contrib/python/ldns.i +++ b/contrib/python/ldns.i @@ -99,12 +99,14 @@ %typemap(in, noblock=1) (ssize_t) { int $1_res = 0; - $1_res = SWIG_AsVal_long($input, &$1); + long val; + $1_res = SWIG_AsVal_long($input, &val); if (!SWIG_IsOK($1_res)) { SWIG_exception_fail(SWIG_ArgError($1_res), "in method '" "$symname" "', argument " "$argnum" " of type '" "$type""'"); } + $1 = val; } From e435a9fdd87e04ac60730ed8107a8524fee4a411 Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Mon, 29 Jan 2024 14:06:35 +0100 Subject: [PATCH 35/64] * Fix for windows compile; asctime_r compat, search for inet_ntop in ws2_32, avoid double decl of inet_ntop, check for symlink call, include config.h in edns.c, have socket compare use correct signedness, add -u repo option to makewin.sh, fix quoting in makewin.sh and check return value of bind and connect in net.c for failure instead of a socket type. --- Changelog | 6 ++++++ Makefile.in | 1 + compat/asctime_r.c | 16 ++++++++++++++ configure.ac | 49 +++++++++++++++++++++++++++++++++++------- edns.c | 1 + examples/ldns-keygen.c | 4 ++++ makewin.sh | 21 +++++++++++++----- net.c | 4 ++-- 8 files changed, 87 insertions(+), 15 deletions(-) create mode 100644 compat/asctime_r.c diff --git a/Changelog b/Changelog index a5477dee..4a7b245c 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,12 @@ * Fix building documentation in build directory. Thanks Michael Tokarev * Updated the configure script for split openssl directories. + * Fix for windows compile; asctime_r compat, search for inet_ntop + in ws2_32, avoid double decl of inet_ntop, check for symlink call, + include config.h in edns.c, have socket compare use correct + signedness, add -u repo option to makewin.sh, fix quoting in + makewin.sh and check return value of bind and connect in net.c + for failure instead of a socket type. 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. diff --git a/Makefile.in b/Makefile.in index c793dd2a..90fa0695 100644 --- a/Makefile.in +++ b/Makefile.in @@ -814,6 +814,7 @@ compat/ctime_r.lo compat/ctime_r.o: $(srcdir)/compat/ctime_r.c ldns/config.h compat/fake-rfc2553.lo compat/fake-rfc2553.o: $(srcdir)/compat/fake-rfc2553.c ldns/config.h ldns/common.h \ $(srcdir)/compat/fake-rfc2553.h compat/gmtime_r.lo compat/gmtime_r.o: $(srcdir)/compat/gmtime_r.c ldns/config.h +compat/asctime_r.lo compat/asctime_r.o: $(srcdir)/compat/asctime_r.c ldns/config.h compat/inet_aton.lo compat/inet_aton.o: $(srcdir)/compat/inet_aton.c ldns/config.h compat/inet_ntop.lo compat/inet_ntop.o: $(srcdir)/compat/inet_ntop.c ldns/config.h compat/inet_pton.lo compat/inet_pton.o: $(srcdir)/compat/inet_pton.c ldns/config.h diff --git a/compat/asctime_r.c b/compat/asctime_r.c new file mode 100644 index 00000000..63e5355f --- /dev/null +++ b/compat/asctime_r.c @@ -0,0 +1,16 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_TIME_H +#include +#endif + +char *asctime_r(const struct tm *tm, char *buf) +{ + /* no thread safety. */ + char* result = asctime(tm); + if(buf && result) + strcpy(buf, result); + return result; +} diff --git a/configure.ac b/configure.ac index ff76665c..59af4962 100644 --- a/configure.ac +++ b/configure.ac @@ -137,21 +137,22 @@ AC_CHECK_FUNC([socket], # modern OS X provides inet_ntop in -lc. # modern Solaris provides inet_ntop in -lsocket -lnsl. # older Solaris provides inet_ntop in -lresolv. +# Windows provides inet_ntop in -lws2_32. AC_CHECK_FUNC([inet_ntop], [], - [AC_SEARCH_LIBS([inet_ntop], [socket c nsl resolv], [ac_cv_func_inet_ntop=yes]) + [AC_SEARCH_LIBS([inet_ntop], [socket c nsl resolv ws2_32], [ac_cv_func_inet_ntop=yes]) ]) # modern Linux provides inet_pton in -lsocket. # modern OS X provides inet_pton in -lc. # modern Solaris provides inet_pton in -lsocket -lnsl. # older Solaris provides inet_pton in -lresolv. +# Windows provides inet_pton in -lws2_32. AC_CHECK_FUNC([inet_pton], [], - [AC_SEARCH_LIBS([inet_pton], [socket c nsl resolv], [ac_cv_func_inet_pton=yes]) + [AC_SEARCH_LIBS([inet_pton], [socket c nsl resolv ws2_32], [ac_cv_func_inet_pton=yes]) ]) - AC_ARG_WITH(drill, AC_HELP_STRING([--with-drill], [Also build drill.]), [],[with_drill="no"]) @@ -736,7 +737,12 @@ case "$enable_rrtype_svcb_https" in ;; esac - +if echo "$tmp_LIBS" | grep "ws2_32" >/dev/null; then + if echo "$LIBSSL_LIBS" | grep "ws2_32" >/dev/null; then + # only need it once. + LIBSSL_LIBS=`echo "$LIBSSL_LIBS" | sed -e 's/ -lws2_32//' -e 's/^-lws2_32//'` + fi +fi AC_SUBST(LIBSSL_CPPFLAGS) AC_SUBST(LIBSSL_LDFLAGS) @@ -900,6 +906,29 @@ AC_CHECK_TYPE(in_port_t, [], [AC_DEFINE([in_port_t], [uint16_t], [in_port_t])], #endif]) ACX_CHECK_SS_FAMILY +AC_CHECK_DECLS([inet_pton,inet_ntop], [], [], [ +AC_INCLUDES_DEFAULT +#ifdef HAVE_NETINET_IN_H +#include +#endif + +#ifdef HAVE_NETINET_TCP_H +#include +#endif + +#ifdef HAVE_ARPA_INET_H +#include +#endif + +#ifdef HAVE_WINSOCK2_H +#include +#endif + +#ifdef HAVE_WS2TCPIP_H +#include +#endif +]) + # AC_FUNC_MALLOC suffers false failures and causes Asan failures. # AC_FUNC_MALLOC # AC_FUNC_REALLOC @@ -909,6 +938,7 @@ AC_REPLACE_FUNCS(b64_ntop) AC_REPLACE_FUNCS(calloc) AC_REPLACE_FUNCS(timegm) AC_REPLACE_FUNCS(gmtime_r) +AC_REPLACE_FUNCS(asctime_r) AC_REPLACE_FUNCS(ctime_r) AC_REPLACE_FUNCS(localtime_r) AC_REPLACE_FUNCS(isblank) @@ -930,7 +960,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ AC_DEFINE([HAVE_FORK_AVAILABLE], 1, [if fork is available for compile]) ], [ AC_MSG_RESULT(no) ]) -AC_CHECK_FUNCS([endprotoent endservent sleep random fcntl strtoul bzero memset b32_ntop b32_pton]) +AC_CHECK_FUNCS([endprotoent endservent sleep random fcntl strtoul bzero memset b32_ntop b32_pton symlink]) if test "x$HAVE_B32_NTOP" = "xyes"; then AC_SUBST(ldns_build_config_have_b32_ntop, 1) else @@ -1114,6 +1144,9 @@ time_t timegm (struct tm *tm); #ifndef HAVE_GMTIME_R struct tm *gmtime_r(const time_t *timep, struct tm *result); #endif +#ifndef HAVE_ASCTIME_R +char *asctime_r(const struct tm *tm, char *buf); +#endif #ifndef HAVE_LOCALTIME_R struct tm *localtime_r(const time_t *timep, struct tm *result); #endif @@ -1128,10 +1161,10 @@ int isascii(int c); int snprintf (char *str, size_t count, const char *fmt, ...); int vsnprintf (char *str, size_t count, const char *fmt, va_list arg); #endif /* HAVE_SNPRINTF */ -#ifndef HAVE_INET_PTON +#if !defined(HAVE_INET_PTON) && !HAVE_DECL_INET_PTON int inet_pton(int af, const char* src, void* dst); #endif /* HAVE_INET_PTON */ -#ifndef HAVE_INET_NTOP +#if !defined(HAVE_INET_NTOP) && !HAVE_DECL_INET_NTOP const char *inet_ntop(int af, const void *src, char *dst, size_t size); #endif #ifndef HAVE_INET_ATON @@ -1145,7 +1178,7 @@ size_t strlcpy(char *dst, const char *src, size_t siz); #endif #ifdef USE_WINSOCK -#define SOCK_INVALID INVALID_SOCKET +#define SOCK_INVALID ((INT_PTR)INVALID_SOCKET) #define close_socket(_s) do { if (_s != SOCK_INVALID) {closesocket(_s); _s = -1;} } while(0) #else #define SOCK_INVALID -1 diff --git a/edns.c b/edns.c index 3d002d67..fe288c04 100644 --- a/edns.c +++ b/edns.c @@ -10,6 +10,7 @@ * See the file LICENSE for the license */ +#include #include #define LDNS_OPTIONLIST_INIT 8 diff --git a/examples/ldns-keygen.c b/examples/ldns-keygen.c index 2f690b69..351fc1b2 100644 --- a/examples/ldns-keygen.c +++ b/examples/ldns-keygen.c @@ -75,9 +75,13 @@ create_symlink(const char *symlink_destination, const char *symlink_name) if (!symlink_name) return result; /* no arg "-s" at all */ +#ifdef HAVE_SYMLINK if ((result = symlink(symlink_destination, symlink_name)) == -1) { fprintf(stderr, "Unable to create symlink %s -> %s: %s\n", symlink_name, symlink_destination, strerror(errno)); } +#else + fprintf(stderr, "Unable to create symlink %s -> %s: no symlink()\n", symlink_name, symlink_destination); +#endif return result; } diff --git a/makewin.sh b/makewin.sh index accc9058..cadecd16 100755 --- a/makewin.sh +++ b/makewin.sh @@ -17,6 +17,7 @@ cross_flag_nonstatic="" RC="no" SNAPSHOT="no" CHECKOUT="" +GITREPO="" # the destination is a zipfile in the start directory ldns-a.b.c.zip # the start directory is a git repository, and it is copied to build from. @@ -49,6 +50,8 @@ while [ "$1" ]; do echo " -s snapshot, current date appended to version" echo " -rc release candidate, the number is added to version" echo " ldns-rc." + echo " -u git_url Retrieve the source from the specified repository url." + echo " Detected from the working copy if not specified." echo " -c Checkout this tag or branch, (defaults to current" echo " branch)." echo " -wssl Pass openssl.tar.gz file, use absolute path." @@ -66,6 +69,10 @@ while [ "$1" ]; do RC="$2" shift ;; + "-u") + GITREPO="$2" + shift + ;; "-wssl") WINSSL="$2" shift @@ -85,6 +92,10 @@ then CHECKOUT=$( (git status | head -n 1 | awk '{print$3}') || echo develop) fi fi +if [ -z "$GITREPO" ] +then + GITREPO=`git config remote.origin.url` +fi # this script creates a temp directory $cdir. # this directory contains subdirectories: @@ -99,11 +110,11 @@ fi # sslinstall-nonstatic/ : install of nonstatic openssl compile info "exporting source into $cdir/ldns" -git clone git://git.nlnetlabs.nl/ldns/ ldns || error_cleanup "git command failed" +git clone "$GITREPO" ldns || error_cleanup "git command failed" (cd ldns; git checkout "$CHECKOUT") || error_cleanup "Could not checkout $CHECKOUT" #svn export . $cdir/ldns info "exporting source into $cdir/ldns-nonstatic" -git clone git://git.nlnetlabs.nl/ldns/ ldns-nonstatic || error_cleanup "git command failed" +git clone "$GITREPO" ldns-nonstatic || error_cleanup "git command failed" (cd ldns-nonstatic; git checkout "$CHECKOUT") || error_cleanup "Could not checkout $CHECKOUT" #svn export . $cdir/ldns-nonstatic @@ -139,7 +150,7 @@ else sslflags="no-shared no-asm -DOPENSSL_NO_CAPIENG mingw" fi info "winssl: Configure $sslflags" -CC="${warch}-w64-mingw32-gcc" AR="${warch}-w64-mingw32-ar" RANLIB="${warch}-w64-mingw32-ranlib" WINDRES="${warch}-w64-mingw32-windres" ./Configure --prefix="$sslinstall" "$sslflags" || error_cleanup "OpenSSL Configure failed" +CC="${warch}-w64-mingw32-gcc" AR="${warch}-w64-mingw32-ar" RANLIB="${warch}-w64-mingw32-ranlib" WINDRES="${warch}-w64-mingw32-windres" ./Configure --prefix="$sslinstall" $sslflags || error_cleanup "OpenSSL Configure failed" info "winssl: make" make || error_cleanup "make failed for $WINSSL" info "winssl: make install_sw" @@ -157,7 +168,7 @@ libtoolize -ci autoreconf -fi ldns_flag="--with-examples --with-drill" info "ldns: Configure $cross_flag $ldns_flag" -$configure "$cross_flag" "$ldns_flag" || error_cleanup "ldns configure failed" +$configure $cross_flag $ldns_flag || error_cleanup "ldns configure failed" info "ldns: make" make || error_cleanup "ldns make failed" # do not strip debug symbols, could be useful for stack traces @@ -196,7 +207,7 @@ libtoolize -ci autoreconf -fi ldns_flag_nonstatic="--with-examples --with-drill" info "ldnsnonstatic: Configure $cross_flag_nonstatic $ldns_flag_nonstatic" -$configure "$cross_flag_nonstatic" "$ldns_flag_nonstatic" || error_cleanup "ldns configure failed" +$configure $cross_flag_nonstatic $ldns_flag_nonstatic || error_cleanup "ldns configure failed" info "ldnsnonstatic: make" make || error_cleanup "ldns make failed" # do not strip debug symbols, could be useful for stack traces diff --git a/net.c b/net.c index 57d4dff2..8fc9c8c4 100644 --- a/net.c +++ b/net.c @@ -201,14 +201,14 @@ ldns_tcp_connect_from(const struct sockaddr_storage *to, socklen_t tolen, return -1; } #endif - if (from && bind(sockfd, (const struct sockaddr*)from, fromlen) == SOCK_INVALID){ + if (from && bind(sockfd, (const struct sockaddr*)from, fromlen) == -1){ close_socket(sockfd); return -1; } /* perform nonblocking connect, to be able to wait with select() */ ldns_sock_nonblock(sockfd); - if (connect(sockfd, (struct sockaddr*)to, tolen) == SOCK_INVALID) { + if (connect(sockfd, (struct sockaddr*)to, tolen) == -1) { #ifndef USE_WINSOCK #ifdef EINPROGRESS if(errno != EINPROGRESS) { From 7a0c22c4b0c3a41769faf35e43d352e62587900f Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Mon, 29 Jan 2024 14:30:47 +0100 Subject: [PATCH 36/64] Fix to install .exe files. --- Changelog | 2 +- Makefile.in | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Changelog b/Changelog index 4a7b245c..d77990a0 100644 --- a/Changelog +++ b/Changelog @@ -7,7 +7,7 @@ include config.h in edns.c, have socket compare use correct signedness, add -u repo option to makewin.sh, fix quoting in makewin.sh and check return value of bind and connect in net.c - for failure instead of a socket type. + for failure instead of a socket type. And fix to install .exe files. 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. diff --git a/Makefile.in b/Makefile.in index 90fa0695..500d224a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -85,6 +85,7 @@ LINTFLAGS += -D"__BEGIN_DECLS=" -D"__ssize_t=ssize_t" -D"__intptr_t=intptr # FreeBSD 9 LINTFLAGS += -D"_RuneLocale=int" DEPFLAG = @DEPFLAG@ +EXEEXT=@EXEEXT@ INSTALL = $(srcdir)/install-sh @@ -177,16 +178,16 @@ install-drill: drill/drill drill/drill.1 $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) $(INSTALL) -m 755 -d $(DESTDIR)$(mandir) $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1 - $(LIBTOOL) --mode=install cp drill/drill $(DESTDIR)$(bindir) + $(LIBTOOL) --mode=install cp drill/drill$(EXEEXT) $(DESTDIR)$(bindir) $(INSTALL) -m 644 drill/drill.1 $(DESTDIR)$(mandir)/man1/drill.1 uninstall-drill: - rm -f $(DESTDIR)$(bindir)/drill $(DESTDIR)$(mandir)/man1/drill.1 + rm -f $(DESTDIR)$(bindir)/drill$(EXEEXT) $(DESTDIR)$(mandir)/man1/drill.1 test ! -d $(DESTDIR)$(mandir) || rmdir -p $(DESTDIR)$(mandir)/man1 || :; test ! -d $(DESTDIR)$(bindir) || rmdir -p $(DESTDIR)$(bindir) || : ; clean-drill: - $(LIBTOOL) --mode clean rm -f $(DRILL_LOBJS) drill/drill drill/drill.1 + $(LIBTOOL) --mode clean rm -f $(DRILL_LOBJS) drill/drill$(EXEEXT) drill/drill.1 examples: setup-builddir no-examples-config-h $(LIB) $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) examples/ldns-dane.1 examples/ldns-verify-zone.1 no-examples-config-h: @@ -229,7 +230,7 @@ install-examples: $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_P $(INSTALL) -m 755 -d $(DESTDIR)$(mandir) $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1 for p in $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) ; do \ - $(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(bindir) ; \ + $(LIBTOOL) --mode=install cp $$p$(EXEEXT) $(DESTDIR)$(bindir) ; \ if test -f $$p.1 ; \ then $(INSTALL) -m 644 $$p.1 $(DESTDIR)$(mandir)/man1 ; \ else $(INSTALL) -m 644 $(srcdir)/$$p.1 $(DESTDIR)$(mandir)/man1 ; \ @@ -238,13 +239,15 @@ install-examples: $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_P uninstall-examples: for p in $(EX_PROGS_BASENM) ; do \ - rm -f $(DESTDIR)$(bindir)/$$p $(DESTDIR)$(mandir)/man1/$$p.1 ;\ + rm -f $(DESTDIR)$(bindir)/$$p$(EXEEXT) $(DESTDIR)$(mandir)/man1/$$p.1 ;\ done test ! -d $(DESTDIR)$(mandir) || rmdir -p $(DESTDIR)$(mandir)/man1 || :; test ! -d $(DESTDIR)$(bindir) || rmdir -p $(DESTDIR)$(bindir) || : ; clean-examples: - $(LIBTOOL) --mode clean rm -f $(EXAMPLE_PROGS) + for p in $(EX_PROGS_BASENM) ; do \ + $(LIBTOOL) --mode clean rm -f $$p$(EXEEXT) ;\ + done $(LIBTOOL) --mode clean rm -f $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) $(LIBTOOL) --mode clean rm -f $(EXAMPLE_LOBJS) $(LIBTOOL) --mode clean rm -f examples/ldns-dane.1 examples/ldns-verify-zone.1 From 073c30f4fda112dfde5c42658afc421de3986305 Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Mon, 29 Jan 2024 16:19:34 +0100 Subject: [PATCH 37/64] Fix to compile with OpenSSL 3.2. Update acx_nlnetlabs.m4 to 48. --- Changelog | 1 + acx_nlnetlabs.m4 | 128 ++++++++++++++++++++++++++++++++++------------- makewin.sh | 25 ++++++--- 3 files changed, 112 insertions(+), 42 deletions(-) diff --git a/Changelog b/Changelog index d77990a0..306d540f 100644 --- a/Changelog +++ b/Changelog @@ -8,6 +8,7 @@ signedness, add -u repo option to makewin.sh, fix quoting in makewin.sh and check return value of bind and connect in net.c for failure instead of a socket type. And fix to install .exe files. + Fix to compile with OpenSSL 3.2. Update acx_nlnetlabs.m4 to 48. 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. diff --git a/acx_nlnetlabs.m4 b/acx_nlnetlabs.m4 index 3d745727..6a01dc5a 100644 --- a/acx_nlnetlabs.m4 +++ b/acx_nlnetlabs.m4 @@ -2,7 +2,11 @@ # Copyright 2009, Wouter Wijngaards, NLnet Labs. # BSD licensed. # -# Version 45 +# Version 48 +# 2024-01-16 fix to add -l:libssp.a to -lcrypto link check. +# and check for getaddrinfo with only header. +# 2024-01-15 fix to add crypt32 to -lcrypto link check when checking for gdi32. +# 2023-05-04 fix to remove unused whitespace. # 2023-01-26 fix -Wstrict-prototypes. # 2022-09-01 fix checking if nonblocking sockets work on OpenBSD. # 2021-08-17 fix sed script in ssldir split handling. @@ -476,7 +480,7 @@ fi dnl Setup ATTR_FORMAT config.h parts. dnl make sure you call ACX_CHECK_FORMAT_ATTRIBUTE also. AC_DEFUN([AHX_CONFIG_FORMAT_ATTRIBUTE], -[ +[ #ifdef HAVE_ATTR_FORMAT # define ATTR_FORMAT(archetype, string_index, first_to_check) \ __attribute__ ((format (archetype, string_index, first_to_check))) @@ -706,7 +710,7 @@ AC_DEFUN([ACX_SSL_CHECKS], [ LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir_lib" ACX_RUNTIME_PATH_ADD([$ssldir_lib]) fi - + AC_MSG_CHECKING([for EVP_sha256 in -lcrypto]) LIBS="$LIBS -lcrypto" LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto" @@ -731,40 +735,73 @@ AC_DEFUN([ACX_SSL_CHECKS], [ ]])],[ AC_DEFINE([HAVE_EVP_SHA256], 1, [If you have EVP_sha256]) - AC_MSG_RESULT(yes) + AC_MSG_RESULT(yes) ],[ AC_MSG_RESULT(no) LIBS="$BAKLIBS" LIBSSL_LIBS="$BAKSSLLIBS" - LIBS="$LIBS -ldl" - LIBSSL_LIBS="$LIBSSL_LIBS -ldl" - AC_MSG_CHECKING([if -lcrypto needs -ldl]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ - int EVP_sha256(void); - (void)EVP_sha256(); - ]])],[ - AC_DEFINE([HAVE_EVP_SHA256], 1, - [If you have EVP_sha256]) - AC_MSG_RESULT(yes) - ],[ - AC_MSG_RESULT(no) - LIBS="$BAKLIBS" - LIBSSL_LIBS="$BAKSSLLIBS" - LIBS="$LIBS -ldl -pthread" - LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread" - AC_MSG_CHECKING([if -lcrypto needs -ldl -pthread]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ - int EVP_sha256(void); - (void)EVP_sha256(); - ]])],[ - AC_DEFINE([HAVE_EVP_SHA256], 1, - [If you have EVP_sha256]) - AC_MSG_RESULT(yes) - ],[ - AC_MSG_RESULT(no) - AC_MSG_ERROR([OpenSSL found in $ssldir, but version 0.9.7 or higher is required]) + + LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32" + LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32" + AC_MSG_CHECKING([if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ + int EVP_sha256(void); + (void)EVP_sha256(); + ]])],[ + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + LIBS="$BAKLIBS" + LIBSSL_LIBS="$BAKSSLLIBS" + + LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" + LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" + AC_MSG_CHECKING([if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ + int EVP_sha256(void); + (void)EVP_sha256(); + ]])],[ + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + LIBS="$BAKLIBS" + LIBSSL_LIBS="$BAKSSLLIBS" + + LIBS="$LIBS -ldl" + LIBSSL_LIBS="$LIBSSL_LIBS -ldl" + AC_MSG_CHECKING([if -lcrypto needs -ldl]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ + int EVP_sha256(void); + (void)EVP_sha256(); + ]])],[ + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + LIBS="$BAKLIBS" + LIBSSL_LIBS="$BAKSSLLIBS" + LIBS="$LIBS -ldl -pthread" + LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread" + AC_MSG_CHECKING([if -lcrypto needs -ldl -pthread]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ + int EVP_sha256(void); + (void)EVP_sha256(); + ]])],[ + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + AC_MSG_ERROR([OpenSSL found in $ssldir, but version 0.9.7 or higher is required]) + ]) + ]) ]) - ]) + ]) ]) ]) fi @@ -778,7 +815,7 @@ AC_CHECK_HEADERS([openssl/rand.h],,, [AC_INCLUDES_DEFAULT]) dnl Check for SSL, where SSL is mandatory dnl Adds --with-ssl option, searches for openssl and defines HAVE_SSL if found -dnl Setup of CPPFLAGS, CFLAGS. Adds -lcrypto to LIBS. +dnl Setup of CPPFLAGS, CFLAGS. Adds -lcrypto to LIBS. dnl Checks main header files of SSL. dnl AC_DEFUN([ACX_WITH_SSL], @@ -871,7 +908,7 @@ dnl see if on windows if test "$ac_cv_header_windows_h" = "yes"; then AC_DEFINE(USE_WINSOCK, 1, [Whether the windows socket API is used]) USE_WINSOCK="1" - if echo $LIBS | grep 'lws2_32' >/dev/null; then + if echo "$LIBS" | grep 'lws2_32' >/dev/null; then : else LIBS="$LIBS -lws2_32" @@ -879,6 +916,24 @@ if test "$ac_cv_header_windows_h" = "yes"; then fi ], dnl no quick getaddrinfo, try mingw32 and winsock2 library. +dnl perhaps getaddrinfo needs only the include +AC_LINK_IFELSE( +[AC_LANG_PROGRAM( +[ +#ifdef HAVE_WS2TCPIP_H +#include +#endif +], +[ + (void)getaddrinfo(NULL, NULL, NULL, NULL); +] +)], +[ +ac_cv_func_getaddrinfo="yes" +AC_DEFINE(USE_WINSOCK, 1, [Whether the windows socket API is used]) +USE_WINSOCK="1" +], + ORIGLIBS="$LIBS" LIBS="$LIBS -lws2_32" AC_LINK_IFELSE( @@ -903,6 +958,7 @@ ac_cv_func_getaddrinfo="no" LIBS="$ORIGLIBS" ]) ) +) AC_MSG_RESULT($ac_cv_func_getaddrinfo) if test $ac_cv_func_getaddrinfo = yes; then @@ -1318,7 +1374,7 @@ AC_DEFUN([AHX_CONFIG_W32_FD_SET_T], #ifdef HAVE_WINSOCK2_H #define FD_SET_T (u_int) #else -#define FD_SET_T +#define FD_SET_T #endif ]) @@ -1356,7 +1412,7 @@ dnl $3: define value, 1 AC_DEFUN([AHX_CONFIG_FLAG_OMITTED], [#if defined($1) && !defined($2) #define $2 $3 -[#]endif ]) +[#]endif]) dnl Wrapper for AHX_CONFIG_FLAG_OMITTED for -D style flags dnl $1: the -DNAME or -DNAME=value string. diff --git a/makewin.sh b/makewin.sh index cadecd16..78ce7478 100755 --- a/makewin.sh +++ b/makewin.sh @@ -50,7 +50,7 @@ while [ "$1" ]; do echo " -s snapshot, current date appended to version" echo " -rc release candidate, the number is added to version" echo " ldns-rc." - echo " -u git_url Retrieve the source from the specified repository url." + echo " -u git_url Retrieve the source from the specified repository url." echo " Detected from the working copy if not specified." echo " -c Checkout this tag or branch, (defaults to current" echo " branch)." @@ -150,6 +150,9 @@ else sslflags="no-shared no-asm -DOPENSSL_NO_CAPIENG mingw" fi info "winssl: Configure $sslflags" +if test -f "/usr/${warch}-w64-mingw32/sys-root/mingw/bin/libssp-0.dll" ; then + export __CNF_LDLIBS="-l:libssp.a" +fi CC="${warch}-w64-mingw32-gcc" AR="${warch}-w64-mingw32-ar" RANLIB="${warch}-w64-mingw32-ranlib" WINDRES="${warch}-w64-mingw32-windres" ./Configure --prefix="$sslinstall" $sslflags || error_cleanup "OpenSSL Configure failed" info "winssl: make" make || error_cleanup "make failed for $WINSSL" @@ -167,8 +170,13 @@ if test ! -f install-sh -a -f ../../install-sh; then cp ../../install-sh . ; fi libtoolize -ci autoreconf -fi ldns_flag="--with-examples --with-drill" -info "ldns: Configure $cross_flag $ldns_flag" -$configure $cross_flag $ldns_flag || error_cleanup "ldns configure failed" +if test -f "/usr/${warch}-w64-mingw32/sys-root/mingw/bin/libssp-0.dll" ; then + info "ldns: Configure $cross_flag $ldns_flag LDFLAGS=\"-fstack-protector\" LIBS=\"-l:libssp.a\"" + $configure $cross_flag $ldns_flag LDFLAGS="-fstack-protector" LIBS="-l:libssp.a" || error_cleanup "ldns configure failed" +else + info "ldns: Configure $cross_flag $ldns_flag" + $configure $cross_flag $ldns_flag || error_cleanup "ldns configure failed" +fi info "ldns: make" make || error_cleanup "ldns make failed" # do not strip debug symbols, could be useful for stack traces @@ -189,7 +197,7 @@ else sslflags_nonstatic="shared no-asm -DOPENSSL_NO_CAPIENG mingw" fi info "winsslnonstatic: Configure $sslflags_nonstatic" -CC="${warch}-w64-mingw32-gcc" AR="${warch}-w64-mingw32-ar" RANLIB="${warch}-w64-mingw32-ranlib" WINDRES="${warch}-w64-mingw32-windres" ./Configure --prefix="$sslinstallnonstatic" "$sslflags_nonstatic" || error_cleanup "OpenSSL Configure failed" +CC="${warch}-w64-mingw32-gcc" AR="${warch}-w64-mingw32-ar" RANLIB="${warch}-w64-mingw32-ranlib" WINDRES="${warch}-w64-mingw32-windres" ./Configure --prefix="$sslinstallnonstatic" $sslflags_nonstatic || error_cleanup "OpenSSL Configure failed" info "winsslnonstatic: make" make || error_cleanup "make failed for $WINSSL" info "winsslnonstatic: make install_sw" @@ -206,8 +214,13 @@ if test ! -f install-sh -a -f ../../install-sh; then cp ../../install-sh . ; fi libtoolize -ci autoreconf -fi ldns_flag_nonstatic="--with-examples --with-drill" -info "ldnsnonstatic: Configure $cross_flag_nonstatic $ldns_flag_nonstatic" -$configure $cross_flag_nonstatic $ldns_flag_nonstatic || error_cleanup "ldns configure failed" +if test -f "/usr/${warch}-w64-mingw32/sys-root/mingw/bin/libssp-0.dll" ; then + info "ldnsnonstatic: Configure $cross_flag_nonstatic $ldns_flag_nonstatic LDFLAGS=\"-fstack-protector\" LIBS=\"-l:libssp.a\"" + $configure $cross_flag_nonstatic $ldns_flag_nonstatic LDFLAGS="-fstack-protector" LIBS="-l:libssp.a" || error_cleanup "ldns configure failed" +else + info "ldnsnonstatic: Configure $cross_flag_nonstatic $ldns_flag_nonstatic" + $configure $cross_flag_nonstatic $ldns_flag_nonstatic || error_cleanup "ldns configure failed" +fi info "ldnsnonstatic: make" make || error_cleanup "ldns make failed" # do not strip debug symbols, could be useful for stack traces From 1ea912e71940397a09be5deb45564520396582af Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Tue, 30 Jan 2024 09:37:03 +0100 Subject: [PATCH 38/64] Fix to include exe files for windows compile. --- makewin.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/makewin.sh b/makewin.sh index 78ce7478..5ff03895 100755 --- a/makewin.sh +++ b/makewin.sh @@ -248,10 +248,12 @@ cp ../ldns/README . cp ../ldns/Changelog . info "copy static exe" for x in "$installplace"/bin/* ; do - cp "$x" "$(basename "$x").exe" + cp "$x" . done # but the shell script stays a script file -mv ldns-config.exe ldns-config +if test -f ldns-config.exe; then + mv ldns-config.exe ldns-config +fi info "copy include" mkdir include mkdir include/ldns From 69738df1c091aa02127cdb6da1d3a6b04a7d8735 Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Tue, 30 Jan 2024 14:36:01 +0100 Subject: [PATCH 39/64] Fix to compile DLLs, and pick out of the lib64 dir, and include libssp-0.dll and ldns-config. --- Changelog | 2 ++ makewin.sh | 23 ++++++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/Changelog b/Changelog index 306d540f..1513a40d 100644 --- a/Changelog +++ b/Changelog @@ -9,6 +9,8 @@ makewin.sh and check return value of bind and connect in net.c for failure instead of a socket type. And fix to install .exe files. Fix to compile with OpenSSL 3.2. Update acx_nlnetlabs.m4 to 48. + Fix to compile DLLs, and pick out of the lib64 dir, and include + libssp-0.dll and ldns-config. 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. diff --git a/makewin.sh b/makewin.sh index 5ff03895..214eedec 100755 --- a/makewin.sh +++ b/makewin.sh @@ -215,8 +215,8 @@ libtoolize -ci autoreconf -fi ldns_flag_nonstatic="--with-examples --with-drill" if test -f "/usr/${warch}-w64-mingw32/sys-root/mingw/bin/libssp-0.dll" ; then - info "ldnsnonstatic: Configure $cross_flag_nonstatic $ldns_flag_nonstatic LDFLAGS=\"-fstack-protector\" LIBS=\"-l:libssp.a\"" - $configure $cross_flag_nonstatic $ldns_flag_nonstatic LDFLAGS="-fstack-protector" LIBS="-l:libssp.a" || error_cleanup "ldns configure failed" + info "ldnsnonstatic: Configure $cross_flag_nonstatic $ldns_flag_nonstatic LDFLAGS=\"-fstack-protector\" LIBS=\"-lssp\"" + $configure $cross_flag_nonstatic $ldns_flag_nonstatic LDFLAGS="-fstack-protector" LIBS="-lssp" || error_cleanup "ldns configure failed" else info "ldnsnonstatic: Configure $cross_flag_nonstatic $ldns_flag_nonstatic" $configure $cross_flag_nonstatic $ldns_flag_nonstatic || error_cleanup "ldns configure failed" @@ -240,9 +240,20 @@ installplacenonstatic="$ldnsinstallnonstatic/usr/$warch-w64-mingw32/sys-root/min cp "$installplace"/lib/libldns.a . cp "$installplacenonstatic"/lib/libldns.dll.a . cp "$installplacenonstatic"/bin/*.dll . -cp "$sslinstallnonstatic"/lib/*.dll.a . +if test -d "$sslinstallnonstatic"/lib64; then + cp "$sslinstallnonstatic"/lib64/*.dll.a . +else + cp "$sslinstallnonstatic"/lib/*.dll.a . +fi cp "$sslinstallnonstatic"/bin/*.dll . -cp "$sslinstallnonstatic"/lib/engines-*/*.dll . +if test -d "$sslinstallnonstatic"/lib64; then + cp "$sslinstallnonstatic"/lib64/engines-*/*.dll . +else + cp "$sslinstallnonstatic"/lib/engines-*/*.dll . +fi +if test -f "/usr/${warch}-w64-mingw32/sys-root/mingw/bin/libssp-0.dll" ; then + cp "/usr/${warch}-w64-mingw32/sys-root/mingw/bin/libssp-0.dll" . +fi cp ../ldns/LICENSE . cp ../ldns/README . cp ../ldns/Changelog . @@ -270,13 +281,15 @@ for x in man1/*.1; do groff -man -Tascii -Z "$x" | grotty -cbu > cat1/"$(basenam info "create cat3" mkdir cat3 for x in man3/*.3; do groff -man -Tascii -Z "$x" | grotty -cbu > cat3/"$(basename "$x" .3).txt"; done +add_files="" +if test -f ldns-config; then add_files="$add_files ldns-config"; fi rm -f "../../$file" info "$file contents" # show contents of directory we are zipping up. du -s ./* # zip it info "zip $file" -zip -r ../../"$file" LICENSE README libldns.a *.dll *.dll.a Changelog *.exe include man1 man3 cat1 cat3 +zip -r ../../"$file" LICENSE README libldns.a *.dll *.dll.a Changelog *.exe $add_files include man1 man3 cat1 cat3 info "Testing $file" (cd ../.. ; zip -T "$file" ) || error_cleanup "errors in zipfile $file" cd .. From 1acfcb2412aa4099e2679f5d7fa3c70c23c9a7ce Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Tue, 7 May 2024 14:43:16 +0200 Subject: [PATCH 40/64] Issue #237 : Resolver uses nameserver commented out in /etc/resolv.conf This /etc/resolv.conf: # x # nameserver 8.8.8.8 Still configured 8.8.8.8 as nameserver, because the comment detection in `ldns_resolver_new_frm_fp_l()` didn't anticipate empty lines before the comment. This fix removed all comment handling from `ldns_resolver_new_frm_fp_l()`. Instead a new function is introduced `ldns_fget_token_l_resolv_conf()` that skips comments that start with '#' and ';'. The old `ldns_fget_token_l()` (that is used for zonefiles too) still accepts only ';' for comments. --- parse.c | 35 ++++++++++++++++++++++++++++++---- resolver.c | 55 +++++++++++------------------------------------------- 2 files changed, 42 insertions(+), 48 deletions(-) diff --git a/parse.c b/parse.c index 9698ba71..af8b2c13 100644 --- a/parse.c +++ b/parse.c @@ -27,9 +27,14 @@ ldns_fget_token(FILE *f, char *token, const char *delim, size_t limit) return ldns_fget_token_l(f, token, delim, limit, NULL); } -ldns_status -ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed - , const char *delim, int *line_nr) +enum file_type2parse { + zone_file_type, resolv_conf_file_type +}; + +static ldns_status +ldns_fget_token_l_st_file_type(FILE *f, char **token, size_t *limit, + bool fixed, const char *delim, int *line_nr, + enum file_type2parse file_type) { int c, prev_c; int p; /* 0 -> no parentheses seen, >0 nr of ( seen */ @@ -98,7 +103,9 @@ ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed } /* do something with comments ; */ - if (c == ';' && quoted == 0) { + if ((c == ';' + || (c == '#' && file_type == resolv_conf_file_type)) + && quoted == 0) { if (prev_c != '\\') { com = 1; } @@ -215,6 +222,26 @@ ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed return i == 0 ? LDNS_STATUS_SYNTAX_EMPTY : LDNS_STATUS_OK; } +ldns_status +ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed + , const char *delim, int *line_nr) +{ + return ldns_fget_token_l_st_file_type( + f, token, limit, fixed, delim, line_nr, zone_file_type); +} + +ssize_t +ldns_fget_token_l_resolv_conf(FILE *f, char *token, const char *delim, + size_t limit, int *line_nr) +{ + if (limit == 0) + limit = LDNS_MAX_LINELEN; + if (ldns_fget_token_l_st_file_type(f, &token, &limit, true, delim, + line_nr, resolv_conf_file_type)) + return -1; + else + return (ssize_t)strlen(token); +} ssize_t ldns_fget_token_l(FILE *f, char *token, const char *delim, size_t limit, int *line_nr) diff --git a/resolver.c b/resolver.c index f9ec65a5..4b398abb 100644 --- a/resolver.c +++ b/resolver.c @@ -761,6 +761,8 @@ ldns_resolver_new_frm_fp(ldns_resolver **res, FILE *fp) return ldns_resolver_new_frm_fp_l(res, fp, NULL); } +ssize_t ldns_fget_token_l_resolv_conf(FILE *f, char *token, const char *delim, + size_t limit, int *line_nr); ldns_status ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) { @@ -775,7 +777,7 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) #endif ssize_t gtr, bgtr; ldns_buffer *b; - int lnr = 0, oldline; + int lnr = 0; FILE* myfp = fp; if(!line_nr) line_nr = &lnr; @@ -809,36 +811,18 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) gtr = 1; word[0] = 0; - oldline = *line_nr; expect = LDNS_RESOLV_KEYWORD; while (gtr > 0) { - /* check comments */ - if (word[0] == '#') { - word[0]='x'; - if(oldline == *line_nr) { - /* skip until end of line */ - int c; - do { - c = fgetc(myfp); - } while(c != EOF && c != '\n'); - if(c=='\n') (*line_nr)++; - } - /* and read next to prepare for further parsing */ - oldline = *line_nr; - continue; - } - oldline = *line_nr; switch(expect) { case LDNS_RESOLV_KEYWORD: /* keyword */ - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); if (gtr != 0) { - if(word[0] == '#') continue; for(i = 0; i < LDNS_RESOLV_KEYWORDS; i++) { if (strcasecmp(keyword[i], word) == 0) { /* chosen the keyword and * expect values carefully - */ + */ expect = i; break; } @@ -856,16 +840,12 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) break; case LDNS_RESOLV_DEFDOMAIN: /* default domain dname */ - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); if (gtr == 0) { if(!fp) fclose(myfp); ldns_resolver_deep_free(r); return LDNS_STATUS_SYNTAX_MISSING_VALUE_ERR; } - if(word[0] == '#') { - expect = LDNS_RESOLV_KEYWORD; - continue; - } tmp = ldns_rdf_new_frm_str(LDNS_RDF_TYPE_DNAME, word); if (!tmp) { if(!fp) fclose(myfp); @@ -879,16 +859,12 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) break; case LDNS_RESOLV_NAMESERVER: /* NS aaaa or a record */ - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); if (gtr == 0) { if(!fp) fclose(myfp); ldns_resolver_deep_free(r); return LDNS_STATUS_SYNTAX_MISSING_VALUE_ERR; } - if(word[0] == '#') { - expect = LDNS_RESOLV_KEYWORD; - continue; - } if(strchr(word, '%')) { /* snip off interface labels, * fe80::222:19ff:fe31:4222%eth0 */ @@ -911,7 +887,7 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) break; case LDNS_RESOLV_SEARCH: /* search list domain dname */ - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); b = LDNS_MALLOC(ldns_buffer); if(!b) { ldns_resolver_deep_free(r); @@ -929,10 +905,6 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) bgtr = ldns_bget_token(b, word, LDNS_PARSE_NORMAL, (size_t) gtr + 1); while (bgtr > 0) { gtr -= bgtr; - if(word[0] == '#') { - expect = LDNS_RESOLV_KEYWORD; - break; - } tmp = ldns_rdf_new_frm_str(LDNS_RDF_TYPE_DNAME, word); if (!tmp) { ldns_resolver_deep_free(r); @@ -954,28 +926,23 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) } break; case LDNS_RESOLV_SORTLIST: - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); /* sortlist not implemented atm */ expect = LDNS_RESOLV_KEYWORD; break; case LDNS_RESOLV_OPTIONS: - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_SKIP_SPACE, 0, line_nr); /* options not implemented atm */ expect = LDNS_RESOLV_KEYWORD; break; case LDNS_RESOLV_ANCHOR: /* a file containing a DNSSEC trust anchor */ - gtr = ldns_fget_token_l(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); + gtr = ldns_fget_token_l_resolv_conf(myfp, word, LDNS_PARSE_NORMAL, 0, line_nr); if (gtr == 0) { ldns_resolver_deep_free(r); if(!fp) fclose(myfp); return LDNS_STATUS_SYNTAX_MISSING_VALUE_ERR; } - if(word[0] == '#') { - expect = LDNS_RESOLV_KEYWORD; - continue; - } - #ifdef HAVE_SSL tmp_rr = ldns_read_anchor_file(word); (void) ldns_resolver_push_dnssec_anchor(r, tmp_rr); From 6acd12d1f57d4b2b36ca35f127a2c9575eef97fb Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Wed, 15 May 2024 13:25:38 +0200 Subject: [PATCH 41/64] Move resolv.conf token parser to parse.h Including a doxygen comment stating the limitations --- ldns/parse.h | 18 +++++++++++++++++- resolver.c | 2 -- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ldns/parse.h b/ldns/parse.h index ba7edf56..3c3df18b 100644 --- a/ldns/parse.h +++ b/ldns/parse.h @@ -59,7 +59,8 @@ ssize_t ldns_fget_token(FILE *f, char *token, const char *delim, size_t limit); /** * returns a token/char from the stream F. * This function deals with ( and ) in the stream, - * and ignores when it finds them. + * and ignores when it finds them. This function also handles and ignores + * zonefile format comments starting with ; * \param[in] *f the file to read from * \param[out] *token the token is put here * \param[in] *delim chars at which the parsing should stop @@ -69,6 +70,21 @@ ssize_t ldns_fget_token(FILE *f, char *token, const char *delim, size_t limit); */ ssize_t ldns_fget_token_l(FILE *f, char *token, const char *delim, size_t limit, int *line_nr); +/** + * returns a token/char from the stream F. + * This function deals with ( and ) in the stream, + * and ignores when it finds them. This function also handles and ignores + * comments such as they can be used in resolv.conf files. Starting with + * either ; or #. + * \param[in] *f the file to read from + * \param[out] *token the token is put here + * \param[in] *delim chars at which the parsing should stop + * \param[in] *limit how much to read. If 0 use builtin maximum + * \param[in] line_nr pointer to an integer containing the current line number (for debugging purposes) + * \return 0 on error of EOF of F otherwise return the length of what is read + */ +ssize_t ldns_fget_token_l_resolv_conf(FILE *f, char *token, const char *delim, size_t limit, int *line_nr); + /** * returns a token/char from the stream f. * This function deals with ( and ) in the stream, diff --git a/resolver.c b/resolver.c index 4b398abb..a426b82c 100644 --- a/resolver.c +++ b/resolver.c @@ -761,8 +761,6 @@ ldns_resolver_new_frm_fp(ldns_resolver **res, FILE *fp) return ldns_resolver_new_frm_fp_l(res, fp, NULL); } -ssize_t ldns_fget_token_l_resolv_conf(FILE *f, char *token, const char *delim, - size_t limit, int *line_nr); ldns_status ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) { From 82e326cd96ed40ebeccd817c0dcf8dc9a86cc67e Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Wed, 15 May 2024 13:29:27 +0200 Subject: [PATCH 42/64] Changelog entry for bug #237 --- Changelog | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index 1513a40d..bb8c7682 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,4 @@ -1.8.4 2022-??-?? +1.8.4 2024-??-?? * Fix building documentation in build directory. Thanks Michael Tokarev * Updated the configure script for split openssl directories. @@ -8,9 +8,11 @@ signedness, add -u repo option to makewin.sh, fix quoting in makewin.sh and check return value of bind and connect in net.c for failure instead of a socket type. And fix to install .exe files. - Fix to compile with OpenSSL 3.2. Update acx_nlnetlabs.m4 to 48. - Fix to compile DLLs, and pick out of the lib64 dir, and include + * Fix to compile with OpenSSL 3.2. Update acx_nlnetlabs.m4 to 48. + * Fix to compile DLLs, and pick out of the lib64 dir, and include libssp-0.dll and ldns-config. + * bugfix #237: Resolver uses nameserver commented out in + /etc/resolv.conf 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. From 34604e451919bdab4947e1252c2491596fd3b873 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Wed, 15 May 2024 13:58:19 +0200 Subject: [PATCH 43/64] Updated configure.ac from autoupdate --- configure.ac | 84 +++++++++++++++++++++++++++------------------------- 1 file changed, 43 insertions(+), 41 deletions(-) diff --git a/configure.ac b/configure.ac index 59af4962..9d36d8bb 100644 --- a/configure.ac +++ b/configure.ac @@ -1,13 +1,13 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_PREREQ(2.56) +AC_PREREQ([2.71]) sinclude(acx_nlnetlabs.m4) # must be numbers. ac_defun because of later processing. m4_define([VERSION_MAJOR],[1]) m4_define([VERSION_MINOR],[8]) m4_define([VERSION_MICRO],[3]) -AC_INIT(ldns, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), dns-team@nlnetlabs.nl, libdns) +AC_INIT([ldns],m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]),[dns-team@nlnetlabs.nl],[libdns]) AC_CONFIG_SRCDIR([packet.c]) # needed to build correct soname AC_SUBST(LDNS_VERSION_MAJOR, [VERSION_MAJOR]) @@ -36,7 +36,7 @@ AC_SUBST(LDNS_VERSION_MICRO, [VERSION_MICRO]) # AC_SUBST(VERSION_INFO, [8:0:5]) -AC_AIX +AC_USE_SYSTEM_EXTENSIONS if test "$ac_cv_header_minix_config_h" = "yes"; then AC_DEFINE(_NETBSD_SOURCE,1, [Enable for compile on Minix]) fi @@ -89,7 +89,7 @@ COPY_FILES($srcdir/$1/*.h, $2) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST -AC_LANG_C +AC_LANG([C]) if test "x$CFLAGS" = "x" ; then ACX_CHECK_COMPILER_FLAG(g, [CFLAGS="-g"]) ACX_CHECK_COMPILER_FLAG(O2, [CFLAGS="-O2 $CFLAGS"]) @@ -153,8 +153,7 @@ AC_CHECK_FUNC([inet_pton], [AC_SEARCH_LIBS([inet_pton], [socket c nsl resolv ws2_32], [ac_cv_func_inet_pton=yes]) ]) -AC_ARG_WITH(drill, AC_HELP_STRING([--with-drill], - [Also build drill.]), +AC_ARG_WITH(drill, AS_HELP_STRING([--with-drill],[Also build drill.]), [],[with_drill="no"]) if test x_$with_drill != x_no ; then AC_SUBST(DRILL,[drill]) @@ -178,8 +177,7 @@ else fi -AC_ARG_WITH(examples, AC_HELP_STRING([--with-examples], - [Also build examples.]), +AC_ARG_WITH(examples, AS_HELP_STRING([--with-examples],[Also build examples.]), [],[with_examples="no"]) if test x_$with_examples != x_no ; then AC_SUBST(EXAMPLES,[examples]) @@ -203,7 +201,7 @@ else fi # add option to disable installation of ldns-config script -AC_ARG_ENABLE(ldns-config, AC_HELP_STRING([--disable-ldns-config], [disable installation of ldns-config (default=enabled)]), +AC_ARG_ENABLE(ldns-config, AS_HELP_STRING([--disable-ldns-config],[disable installation of ldns-config (default=enabled)]), enable_ldns_config=$enableval, enable_ldns_config=yes) if test "x$enable_ldns_config" = xyes; then AC_SUBST(INSTALL_CONFIG, [install-config]) @@ -218,7 +216,7 @@ else fi # add option to disable library printing to stderr -AC_ARG_ENABLE(stderr-msgs, AC_HELP_STRING([--enable-stderr-msgs], [Enable printing to stderr (default=disabled)]), enable_stderr_msgs=$enableval, enable_stderr_msgs=no) +AC_ARG_ENABLE(stderr-msgs, AS_HELP_STRING([--enable-stderr-msgs],[Enable printing to stderr (default=disabled)]), enable_stderr_msgs=$enableval, enable_stderr_msgs=no) case "$enable_stderr_msgs" in no) dnl default ;; @@ -238,8 +236,7 @@ AX_CONFIG_FEATURE( PYTHON_X_CFLAGS="" ldns_with_pyldns=no ldns_with_pyldnsx=no -AC_ARG_WITH(pyldns, AC_HELP_STRING([--with-pyldns], - [generate python library, or --without-pyldns to disable Python support.]), +AC_ARG_WITH(pyldns, AS_HELP_STRING([--with-pyldns],[generate python library, or --without-pyldns to disable Python support.]), [],[ withval="no" ]) ldns_have_python=no if test x_$withval != x_no; then @@ -294,8 +291,7 @@ fi AC_SUBST(PYTHON_X_CFLAGS) # Check for pyldnsx -AC_ARG_WITH(pyldnsx, AC_HELP_STRING([--without-pyldnsx], - [Do not install the ldnsx python module, or --with-pyldnsx to install it.]), +AC_ARG_WITH(pyldnsx, AS_HELP_STRING([--without-pyldnsx],[Do not install the ldnsx python module, or --with-pyldnsx to install it.]), [],[ withval="with_pyldns" ]) if test x_$withval != x_no; then if test x_$ldns_with_pyldns != x_no; then @@ -325,8 +321,7 @@ fi # check for perl ldns_with_p5_dns_ldns=no -AC_ARG_WITH(p5-dns-ldns, AC_HELP_STRING([--with-p5-dns-ldns], - [generate DNS::LDNS perl bindings]), +AC_ARG_WITH(p5-dns-ldns, AS_HELP_STRING([--with-p5-dns-ldns],[generate DNS::LDNS perl bindings]), [],[ withval="no" ]) ldns_have_perl=no if test x_$withval != x_no; then @@ -391,7 +386,7 @@ So either no OpenSSL at all (the include already failed), or the version < 3.0.0 #AC_CHECK_PROG(glibtool, glibtool, [glibtool], ) #AC_CHECK_PROGS(libtool, [libtool15 libtool], [./libtool]) -AC_ARG_ENABLE(sha2, AC_HELP_STRING([--disable-sha2], [Disable SHA256 and SHA512 RRSIG support])) +AC_ARG_ENABLE(sha2, AS_HELP_STRING([--disable-sha2],[Disable SHA256 and SHA512 RRSIG support])) case "$enable_sha2" in no) ;; @@ -516,7 +511,7 @@ eval "ac_cv_c_gost_works=maybe" fi ])dnl -AC_ARG_ENABLE(gost, AC_HELP_STRING([--disable-gost], [Disable GOST support])) +AC_ARG_ENABLE(gost, AS_HELP_STRING([--disable-gost],[Disable GOST support])) case "$enable_gost" in no) ;; @@ -528,7 +523,7 @@ case "$enable_gost" in AC_CHECK_FUNC(EVP_PKEY_set_type_str, [],[AC_MSG_ERROR([OpenSSL >= 1.0.0 is needed for GOST support or rerun with --disable-gost])]) AC_CHECK_FUNC(EC_KEY_new, [], [AC_MSG_ERROR([No ECC functions found in OpenSSL: please upgrade OpenSSL or rerun with --disable-gost])]) AC_CHECK_GOST_WORKS - AC_ARG_ENABLE(gost-anyway, AC_HELP_STRING([--enable-gost-anyway], [Enable GOST even without a GOST engine installed])) + AC_ARG_ENABLE(gost-anyway, AS_HELP_STRING([--enable-gost-anyway],[Enable GOST even without a GOST engine installed])) if test "$ac_cv_c_gost_works" != "no" -o "$enable_gost_anyway" = "yes"; then if test "$ac_cv_c_gost_works" = "no"; then AC_MSG_RESULT([no, but compiling with GOST support anyway]) @@ -546,7 +541,7 @@ case "$enable_gost" in ;; esac -AC_ARG_ENABLE(ecdsa, AC_HELP_STRING([--disable-ecdsa], [Disable ECDSA support])) +AC_ARG_ENABLE(ecdsa, AS_HELP_STRING([--disable-ecdsa],[Disable ECDSA support])) case "$enable_ecdsa" in no) ;; @@ -564,7 +559,7 @@ case "$enable_ecdsa" in ;; esac -AC_ARG_ENABLE(dsa, AC_HELP_STRING([--disable-dsa], [Disable DSA support])) +AC_ARG_ENABLE(dsa, AS_HELP_STRING([--disable-dsa],[Disable DSA support])) case "$enable_dsa" in no) AC_SUBST(ldns_build_config_use_dsa, 0) @@ -580,7 +575,7 @@ case "$enable_dsa" in ;; esac -AC_ARG_ENABLE(ed25519, AC_HELP_STRING([--disable-ed25519], [Disable (experimental) ED25519 support. Default is detect])) +AC_ARG_ENABLE(ed25519, AS_HELP_STRING([--disable-ed25519],[Disable (experimental) ED25519 support. Default is detect])) case "$enable_ed25519" in no) AC_SUBST(ldns_build_config_use_ed25519, 0) @@ -597,7 +592,7 @@ case "$enable_ed25519" in ;; esac -AC_ARG_ENABLE(ed448, AC_HELP_STRING([--disable-ed448], [Disable (experimental) ED448 support. Default is detect])) +AC_ARG_ENABLE(ed448, AS_HELP_STRING([--disable-ed448],[Disable (experimental) ED448 support. Default is detect])) case "$enable_ed448" in no) AC_SUBST(ldns_build_config_use_ed448, 0) @@ -614,9 +609,9 @@ case "$enable_ed448" in ;; esac -AC_ARG_ENABLE(dane, AC_HELP_STRING([--disable-dane], [Disable DANE support])) -AC_ARG_ENABLE(dane-verify, AC_HELP_STRING([--disable-dane-verify], [Disable DANE verify support])) -AC_ARG_ENABLE(dane-ta-usage, AC_HELP_STRING([--disable-dane-ta-usage], [Disable DANE-TA usage type support])) +AC_ARG_ENABLE(dane, AS_HELP_STRING([--disable-dane],[Disable DANE support])) +AC_ARG_ENABLE(dane-verify, AS_HELP_STRING([--disable-dane-verify],[Disable DANE verify support])) +AC_ARG_ENABLE(dane-ta-usage, AS_HELP_STRING([--disable-dane-ta-usage],[Disable DANE-TA usage type support])) AC_ARG_ENABLE(full-dane,, [ enable_dane_ta_usage=yes @@ -672,7 +667,7 @@ case "$enable_dane" in ;; esac -AC_ARG_ENABLE(rrtype-ninfo, AC_HELP_STRING([--enable-rrtype-ninfo], [Enable draft RR type ninfo.])) +AC_ARG_ENABLE(rrtype-ninfo, AS_HELP_STRING([--enable-rrtype-ninfo],[Enable draft RR type ninfo.])) case "$enable_rrtype_ninfo" in yes) AC_DEFINE_UNQUOTED([RRTYPE_NINFO], [], [Define this to enable RR type NINFO.]) @@ -680,7 +675,7 @@ case "$enable_rrtype_ninfo" in no|*) ;; esac -AC_ARG_ENABLE(rrtype-rkey, AC_HELP_STRING([--enable-rrtype-rkey], [Enable draft RR type rkey.])) +AC_ARG_ENABLE(rrtype-rkey, AS_HELP_STRING([--enable-rrtype-rkey],[Enable draft RR type rkey.])) case "$enable_rrtype_rkey" in yes) AC_DEFINE_UNQUOTED([RRTYPE_RKEY], [], [Define this to enable RR type RKEY.]) @@ -688,7 +683,7 @@ case "$enable_rrtype_rkey" in no|*) ;; esac -AC_ARG_ENABLE(rrtype-openpgpkey, AC_HELP_STRING([--disable-rrtype-openpgpkey], [Disable openpgpkey RR type.])) +AC_ARG_ENABLE(rrtype-openpgpkey, AS_HELP_STRING([--disable-rrtype-openpgpkey],[Disable openpgpkey RR type.])) case "$enable_rrtype_openpgpkey" in no) ;; @@ -696,7 +691,7 @@ case "$enable_rrtype_openpgpkey" in AC_DEFINE_UNQUOTED([RRTYPE_OPENPGPKEY], [], [Define this to enable RR type OPENPGPKEY.]) ;; esac -AC_ARG_ENABLE(rrtype-ta, AC_HELP_STRING([--enable-rrtype-ta], [Enable draft RR type ta.])) +AC_ARG_ENABLE(rrtype-ta, AS_HELP_STRING([--enable-rrtype-ta],[Enable draft RR type ta.])) case "$enable_rrtype_ta" in yes) AC_DEFINE_UNQUOTED([RRTYPE_TA], [], [Define this to enable RR type TA.]) @@ -704,7 +699,7 @@ case "$enable_rrtype_ta" in no|*) ;; esac -AC_ARG_ENABLE(rrtype-avc, AC_HELP_STRING([--enable-rrtype-avc], [Enable draft RR type avc.])) +AC_ARG_ENABLE(rrtype-avc, AS_HELP_STRING([--enable-rrtype-avc],[Enable draft RR type avc.])) case "$enable_rrtype_avc" in yes) AC_DEFINE_UNQUOTED([RRTYPE_AVC], [], [Define this to enable RR type AVC.]) @@ -712,7 +707,7 @@ case "$enable_rrtype_avc" in no|*) ;; esac -AC_ARG_ENABLE(rrtype-doa, AC_HELP_STRING([--enable-rrtype-doa], [Enable draft RR type DOA.])) +AC_ARG_ENABLE(rrtype-doa, AS_HELP_STRING([--enable-rrtype-doa],[Enable draft RR type DOA.])) case "$enable_rrtype_doa" in yes) AC_DEFINE_UNQUOTED([RRTYPE_DOA], [], [Define this to enable RR type DOA.]) @@ -720,7 +715,7 @@ case "$enable_rrtype_doa" in no|*) ;; esac -AC_ARG_ENABLE(rrtype-amtrelay, AC_HELP_STRING([--enable-rrtype-amtrelay], [Enable draft RR type AMTRELAY.])) +AC_ARG_ENABLE(rrtype-amtrelay, AS_HELP_STRING([--enable-rrtype-amtrelay],[Enable draft RR type AMTRELAY.])) case "$enable_rrtype_amtrelay" in yes) AC_DEFINE_UNQUOTED([RRTYPE_AMTRELAY], [], [Define this to enable RR type AMTRELAY.]) @@ -728,7 +723,7 @@ case "$enable_rrtype_amtrelay" in no|*) ;; esac -AC_ARG_ENABLE(rrtype-svcb-https, AC_HELP_STRING([--disable-rrtype-svcb-https], [Disable RR types SVCB and HTTPS.])) +AC_ARG_ENABLE(rrtype-svcb-https, AS_HELP_STRING([--disable-rrtype-svcb-https],[Disable RR types SVCB and HTTPS.])) case "$enable_rrtype_svcb_https" in no) ;; @@ -782,7 +777,15 @@ ACX_ARG_RPATH AC_C_BIGENDIAN # Checks for header files. -AC_HEADER_STDC +m4_warn([obsolete], +[The preprocessor macro `STDC_HEADERS' is obsolete. + Except in unusual embedded environments, you can safely include all + ISO C90 headers unconditionally.])dnl +# Autoupdate added the next two lines to ensure that your configure +# script's behavior did not change. They are probably safe to remove. +AC_CHECK_INCLUDES_DEFAULT +AC_PROG_EGREP + AC_HEADER_STDBOOL #AC_HEADER_SYS_WAIT #AC_CHECK_HEADERS([getopt.h fcntl.h stdlib.h string.h strings.h unistd.h]) @@ -986,8 +989,7 @@ ACX_FUNC_IOCTLSOCKET ACX_CHECK_FORMAT_ATTRIBUTE ACX_CHECK_UNUSED_ATTRIBUTE -AC_ARG_WITH(xcode-sdk, AC_HELP_STRING([--with-xcode-sdk], - [Set xcode SDK version. Default is autodetect]), +AC_ARG_WITH(xcode-sdk, AS_HELP_STRING([--with-xcode-sdk],[Set xcode SDK version. Default is autodetect]), [],[with_xcode_sdk="yes"]) if test "x_$with_xcode_sdk" != "x_no" ; then # check OSX deployment target, if needed @@ -1015,14 +1017,14 @@ fi AC_DEFINE([SYSCONFDIR], [sysconfdir], [System configuration dir]) -AC_ARG_WITH(trust-anchor, AC_HELP_STRING([--with-trust-anchor=KEYFILE], [Default location of the trust anchor file for drill and ldns-dane. [default=SYSCONFDIR/unbound/root.key]]), [ +AC_ARG_WITH(trust-anchor, AS_HELP_STRING([--with-trust-anchor=KEYFILE],[Default location of the trust anchor file for drill and ldns-dane. [default=SYSCONFDIR/unbound/root.key]]), [ AC_SUBST([LDNS_TRUST_ANCHOR_FILE], ["$withval"]) AC_MSG_NOTICE([Default trust anchor: $withval]) ],[ AC_SUBST([LDNS_TRUST_ANCHOR_FILE], ["\$(sysconfdir)/unbound/root.key"]) ]) -AC_ARG_WITH(ca-file, AC_HELP_STRING([--with-ca-file=CAFILE], [File containing CA certificates for ldns-dane]), [ +AC_ARG_WITH(ca-file, AS_HELP_STRING([--with-ca-file=CAFILE],[File containing CA certificates for ldns-dane]), [ AC_DEFINE([HAVE_DANE_CA_FILE], [1], [Is a CAFILE given at configure time]) AC_DEFINE_UNQUOTED([LDNS_DANE_CA_FILE], ["$withval"], [Is a CAFILE given at configure time]) AC_MSG_NOTICE([Using CAfile: $withval]) @@ -1032,7 +1034,7 @@ AC_ARG_WITH(ca-file, AC_HELP_STRING([--with-ca-file=CAFILE], [File containing CA AC_SUBST(DEFAULT_CAFILE, []) ]) -AC_ARG_WITH(ca-path, AC_HELP_STRING([--with-ca-path=CAPATH], [Directory containing CA certificate files for ldns-dane]), [ +AC_ARG_WITH(ca-path, AS_HELP_STRING([--with-ca-path=CAPATH],[Directory containing CA certificate files for ldns-dane]), [ AC_DEFINE([HAVE_DANE_CA_PATH], [1], [Is a CAPATH given at configure time]) AC_DEFINE_UNQUOTED([LDNS_DANE_CA_PATH], ["$withval"], [Is a CAPATH given at configure time]) AC_MSG_NOTICE([Using CApath: $withval]) @@ -1216,7 +1218,7 @@ CONFIG_FILES="Makefile libdns.doxygen ldns/common.h ldns/net.h ldns/util.h packa AC_SUBST(CONFIG_FILES) AC_CONFIG_FILES([$CONFIG_FILES]) -AC_CONFIG_HEADER([ldns/config.h]) +AC_CONFIG_HEADERS([ldns/config.h]) AC_OUTPUT COPY_HEADER_FILES(ldns/, ldns/) From 2c7d3929905f3d39bbfedb3120d62cdb96916c54 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Wed, 15 May 2024 14:18:48 +0200 Subject: [PATCH 44/64] Added RESINFO draft RR type enable with: --enable-rrtype-resinfo See https://datatracker.ietf.org/doc/draft-ietf-add-resolver-info --- Changelog | 3 ++- configure.ac | 17 +++++++++++++---- ldns/rr.h | 13 ++++++++----- rr.c | 7 +++++++ 4 files changed, 30 insertions(+), 10 deletions(-) diff --git a/Changelog b/Changelog index bb8c7682..f17bd82f 100644 --- a/Changelog +++ b/Changelog @@ -12,7 +12,8 @@ * Fix to compile DLLs, and pick out of the lib64 dir, and include libssp-0.dll and ldns-config. * bugfix #237: Resolver uses nameserver commented out in - /etc/resolv.conf + /etc/resolv.conf. Thanks grembo. + * Added RESINFO draft rrtype. Enable with --enable-rrtype-resinfo 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. diff --git a/configure.ac b/configure.ac index 9d36d8bb..fab57fbc 100644 --- a/configure.ac +++ b/configure.ac @@ -715,12 +715,12 @@ case "$enable_rrtype_doa" in no|*) ;; esac -AC_ARG_ENABLE(rrtype-amtrelay, AS_HELP_STRING([--enable-rrtype-amtrelay],[Enable draft RR type AMTRELAY.])) +AC_ARG_ENABLE(rrtype-amtrelay, AS_HELP_STRING([--disable-rrtype-amtrelay],[Disable RR type AMTRELAY.])) case "$enable_rrtype_amtrelay" in - yes) - AC_DEFINE_UNQUOTED([RRTYPE_AMTRELAY], [], [Define this to enable RR type AMTRELAY.]) + no) ;; - no|*) + yes|*) + AC_DEFINE_UNQUOTED([RRTYPE_AMTRELAY], [], [Define this to enable RR type AMTRELAY.]) ;; esac AC_ARG_ENABLE(rrtype-svcb-https, AS_HELP_STRING([--disable-rrtype-svcb-https],[Disable RR types SVCB and HTTPS.])) @@ -731,6 +731,15 @@ case "$enable_rrtype_svcb_https" in AC_DEFINE_UNQUOTED([RRTYPE_SVCB_HTTPS], [], [Define this to enable RR types SVCB and HTTPS.]) ;; esac +AC_ARG_ENABLE(rrtype-resinfo, AS_HELP_STRING([--enable-rrtype-resinfo],[Enable RR type RESINFO.])) +case "$enable_rrtype_resinfo" in + yes) + AC_DEFINE_UNQUOTED([RRTYPE_RESINFO], [], [Define this to enable RR type RESINFO.]) + ;; + no|*) + ;; +esac + if echo "$tmp_LIBS" | grep "ws2_32" >/dev/null; then if echo "$LIBSSL_LIBS" | grep "ws2_32" >/dev/null; then diff --git a/ldns/rr.h b/ldns/rr.h index 44d54121..a42ff7a6 100644 --- a/ldns/rr.h +++ b/ldns/rr.h @@ -191,9 +191,9 @@ enum ldns_enum_rr_type LDNS_RR_TYPE_CDNSKEY = 60, /* RFC 7344 */ LDNS_RR_TYPE_OPENPGPKEY = 61, /* RFC 7929 */ LDNS_RR_TYPE_CSYNC = 62, /* RFC 7477 */ - LDNS_RR_TYPE_ZONEMD = 63, /* draft-ietf-dnsop-dns-zone-digest */ - LDNS_RR_TYPE_SVCB = 64, /* draft-ietf-dnsop-svcb-https */ - LDNS_RR_TYPE_HTTPS = 65, /* draft-ietf-dnsop-svcb-https */ + LDNS_RR_TYPE_ZONEMD = 63, /* RFC 8976 */ + LDNS_RR_TYPE_SVCB = 64, /* RFC 9460 */ + LDNS_RR_TYPE_HTTPS = 65, /* RFC 9460 */ LDNS_RR_TYPE_SPF = 99, /* RFC 4408 */ @@ -225,9 +225,12 @@ enum ldns_enum_rr_type LDNS_RR_TYPE_AVC = 258, /* Cisco's DNS-AS RR, see www.dns-as.org */ LDNS_RR_TYPE_DOA = 259, /* draft-durand-doa-over-dns */ - /** draft-ietf-mboned-driad-amt-discovery **/ + /** RFC 8777 **/ LDNS_RR_TYPE_AMTRELAY = 260, + /** draft-ietf-add-resolver-info */ + LDNS_RR_TYPE_RESINFO = 261, + /** DNSSEC Trust Authorities */ LDNS_RR_TYPE_TA = 32768, /* RFC 4431, 5074, DNSSEC Lookaside Validation */ @@ -243,7 +246,7 @@ enum ldns_enum_rr_type typedef enum ldns_enum_rr_type ldns_rr_type; /* The first fields are contiguous and can be referenced instantly */ -#define LDNS_RDATA_FIELD_DESCRIPTORS_COMMON (LDNS_RR_TYPE_AMTRELAY + 1) +#define LDNS_RDATA_FIELD_DESCRIPTORS_COMMON (LDNS_RR_TYPE_RESINFO + 1) /** * Resource Record diff --git a/rr.c b/rr.c index 95ab71d3..a9582b10 100644 --- a/rr.c +++ b/rr.c @@ -2488,6 +2488,13 @@ static ldns_rr_descriptor rdata_field_descriptors[] = { #else {LDNS_RR_TYPE_NULL, "TYPE260", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, #endif +#ifdef RRTYPE_RESINFO + /* 261 */ + {LDNS_RR_TYPE_RESINFO, "RESINFO", 1, 0, NULL, LDNS_RDF_TYPE_STR, LDNS_RR_NO_COMPRESS, 0 }, +#else +{LDNS_RR_TYPE_NULL, "TYPE261", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, +#endif + /* split in array, no longer contiguous */ From 86629fe73fbe05dc5a907479fe4ad86ecc4b9a20 Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Thu, 30 May 2024 18:52:21 +0200 Subject: [PATCH 45/64] Don't rely on libcrypto returning static buffers ldns is one of very few applications relying on being able to pass NULL as last argument to the one-step hashing functions. BoringSSL has removed this functionality in 2017 [1] and LibreSSL 4.0 will do the same. Applications can pass in a correctly-sized buffer on the stack. [1]: https://boringssl-review.googlesource.com/14528 --- dnssec_sign.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dnssec_sign.c b/dnssec_sign.c index 41d845f3..dba2d1c2 100644 --- a/dnssec_sign.c +++ b/dnssec_sign.c @@ -332,6 +332,7 @@ ldns_rdf * ldns_sign_public_dsa(ldns_buffer *to_sign, DSA *key) { #ifdef USE_DSA + unsigned char md[EVP_MAX_MD_SIZE]; unsigned char *sha1_hash; ldns_rdf *sigdata_rdf; ldns_buffer *b64sig; @@ -347,7 +348,7 @@ ldns_sign_public_dsa(ldns_buffer *to_sign, DSA *key) } sha1_hash = SHA1((unsigned char*)ldns_buffer_begin(to_sign), - ldns_buffer_position(to_sign), NULL); + ldns_buffer_position(to_sign), md); if (!sha1_hash) { ldns_buffer_free(b64sig); return NULL; @@ -571,6 +572,7 @@ ldns_sign_public_evp(ldns_buffer *to_sign, ldns_rdf * ldns_sign_public_rsasha1(ldns_buffer *to_sign, RSA *key) { + unsigned char md[EVP_MAX_MD_SIZE]; unsigned char *sha1_hash; unsigned int siglen; ldns_rdf *sigdata_rdf; @@ -584,7 +586,7 @@ ldns_sign_public_rsasha1(ldns_buffer *to_sign, RSA *key) } sha1_hash = SHA1((unsigned char*)ldns_buffer_begin(to_sign), - ldns_buffer_position(to_sign), NULL); + ldns_buffer_position(to_sign), md); if (!sha1_hash) { ldns_buffer_free(b64sig); return NULL; @@ -607,6 +609,7 @@ ldns_sign_public_rsasha1(ldns_buffer *to_sign, RSA *key) ldns_rdf * ldns_sign_public_rsamd5(ldns_buffer *to_sign, RSA *key) { + unsigned char md[EVP_MAX_MD_SIZE]; unsigned char *md5_hash; unsigned int siglen; ldns_rdf *sigdata_rdf; @@ -618,7 +621,7 @@ ldns_sign_public_rsamd5(ldns_buffer *to_sign, RSA *key) } md5_hash = MD5((unsigned char*)ldns_buffer_begin(to_sign), - ldns_buffer_position(to_sign), NULL); + ldns_buffer_position(to_sign), md); if (!md5_hash) { ldns_buffer_free(b64sig); return NULL; From a0ae177dc1a9ad83bbda1539d44da0a542966045 Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Wed, 5 Jun 2024 22:13:03 -0700 Subject: [PATCH 46/64] Ignore build generated files This change ignores several files which are generated by autotools, et al. Signed-off-by: Enji Cooper --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index dde1dc46..7ab36ac3 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ /compat/strlcpy.lo /compat/timegm.o /compat/timegm.lo +/compile /config.guess /config.h /config.log @@ -158,10 +159,12 @@ /ldns/config.h /ldns/config.h.in /ldns/net.h +/ldns/stamp-h1 /ldns/util.h /ldns_wrapper.lo /ldns_wrapper.o /lib +/libdns.doxygen /libldns.la /libtool /linktest @@ -170,6 +173,7 @@ /ltmain.sh /m4/lt*.m4 /m4/libtool.m4 +/missing /net.lo /net.o /packaging/ldns-config From d97c5392e720c3c5905e88c1291e0f135185c73f Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Wed, 5 Jun 2024 22:19:43 -0700 Subject: [PATCH 47/64] Fix typos (`the the` -> `the`) Signed-off-by: Enji Cooper --- README.snapshots | 2 +- dnssec.c | 2 +- ldns/parse.h | 6 +++--- ldns/radix.h | 2 +- ldns/rdata.h | 2 +- lua/rns-specs | 2 +- pcat/pcat-diff.1 | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.snapshots b/README.snapshots index 891fcca1..df7ee003 100644 --- a/README.snapshots +++ b/README.snapshots @@ -3,6 +3,6 @@ ldns - snapshot releases Snapshot releases are not official released. They can be released to interested parties for development. -Snapshots can be recognized from the date in the the tar file name. +Snapshots can be recognized from the date in the tar file name. They should not be used for packaging in distributions. diff --git a/dnssec.c b/dnssec.c index fbaa518a..9055284c 100644 --- a/dnssec.c +++ b/dnssec.c @@ -959,7 +959,7 @@ ldns_create_nsec(ldns_rdf *cur_owner, ldns_rdf *next_owner, ldns_rr_list *rrs) { /* we do not do any check here - garbage in, garbage out */ - /* the the start and end names - get the type from the + /* the start and end names - get the type from the * before rrlist */ /* inefficient, just give it a name, a next name, and a list of rrs */ diff --git a/ldns/parse.h b/ldns/parse.h index 3c3df18b..97d0d8ec 100644 --- a/ldns/parse.h +++ b/ldns/parse.h @@ -131,7 +131,7 @@ ssize_t ldns_bget_token(ldns_buffer *b, char *token, const char *delim, size_t l * \param[in] k_del keyword delimiter * \param[out] data the data found * \param[in] d_del the data delimiter - * \param[in] data_limit maximum size the the data buffer + * \param[in] data_limit maximum size the data buffer * \return the number of character read */ ssize_t ldns_fget_keyword_data(FILE *f, const char *keyword, const char *k_del, char *data, const char *d_del, size_t data_limit); @@ -144,7 +144,7 @@ ssize_t ldns_fget_keyword_data(FILE *f, const char *keyword, const char *k_del, * \param[in] k_del keyword delimiter * \param[out] data the data found * \param[in] d_del the data delimiter - * \param[in] data_limit maximum size the the data buffer + * \param[in] data_limit maximum size the data buffer * \param[in] line_nr pointer to an integer containing the current line number (for debugging purposes) * \return the number of character read @@ -159,7 +159,7 @@ ssize_t ldns_fget_keyword_data_l(FILE *f, const char *keyword, const char *k_del * \param[in] k_del keyword delimiter * \param[out] data the data found * \param[in] d_del the data delimiter - * \param[in] data_limit maximum size the the data buffer + * \param[in] data_limit maximum size the data buffer * \return the number of character read */ ssize_t ldns_bget_keyword_data(ldns_buffer *b, const char *keyword, const char *k_del, char *data, const char *d_del, size_t data_limit); diff --git a/ldns/radix.h b/ldns/radix.h index 4cb42b48..f7a253dd 100644 --- a/ldns/radix.h +++ b/ldns/radix.h @@ -74,7 +74,7 @@ struct ldns_radix_node_t { void* data; /** Parent node. */ ldns_radix_node_t* parent; - /** Index in the the parent node select edge array. */ + /** Index in the parent node select edge array. */ uint8_t parent_index; /** Length of the array. */ uint16_t len; diff --git a/ldns/rdata.h b/ldns/rdata.h index c8a0396c..1e2fd397 100644 --- a/ldns/rdata.h +++ b/ldns/rdata.h @@ -243,7 +243,7 @@ size_t ldns_rdf_size(const ldns_rdf *rd); /** * returns the type of the rdf. We need to insert _get_ - * here to prevent conflict the the rdf_type TYPE. + * here to prevent conflict the rdf_type TYPE. * \param[in] *rd the rdf to read from * \return ldns_rdf_type with the type */ diff --git a/lua/rns-specs b/lua/rns-specs index cc25c790..6aa43990 100644 --- a/lua/rns-specs +++ b/lua/rns-specs @@ -85,7 +85,7 @@ freedom in the packet mangling. (ghe ghe :-) ) To keep matters interesting some sort of randomness is required in some step, otherwise each packet is mangled in the same way. Also this -randomness together with the Lua script needs to be logged so the the +randomness together with the Lua script needs to be logged so the actual mangling can be replayed. :Packet Mangling: address the different elements: diff --git a/pcat/pcat-diff.1 b/pcat/pcat-diff.1 index 3f5a5a8d..5f7cd635 100644 --- a/pcat/pcat-diff.1 +++ b/pcat/pcat-diff.1 @@ -9,7 +9,7 @@ pcat-diff \- show the difference between two pcat files. .SH DESCRIPTION \fBpcat-diff\fR reads in two pcat files and show the differences -between the them. +between them. Its output is another pcat stream which can then be interpreted by pcat-print. From 5afb814854322854425320b781e286b79a1be7ea Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Wed, 5 Jun 2024 22:25:36 -0700 Subject: [PATCH 48/64] ldns_convert_dsa_rrsig_rdf2asn1: fix memory leak Prior to this change `dsasig` was not freed when calling `DSA_SIG_set0` failed. Free `dsasig` on error in that code path now. Reported by: Coverity Signed-off-by: Enji Cooper --- dnssec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dnssec.c b/dnssec.c index 9055284c..0a7beb4e 100644 --- a/dnssec.c +++ b/dnssec.c @@ -1836,8 +1836,10 @@ ldns_convert_dsa_rrsig_rdf2asn1(ldns_buffer *target_buffer, return LDNS_STATUS_MEM_ERR; } # ifdef HAVE_DSA_SIG_SET0 - if (! DSA_SIG_set0(dsasig, R, S)) - return LDNS_STATUS_SSL_ERR; + if (! DSA_SIG_set0(dsasig, R, S)) { + DSA_SIG_free(dsasig); + return LDNS_STATUS_SSL_ERR; + } # else dsasig->r = R; dsasig->s = S; From 388e124841c208b3e8dc39c804e7f3679d30e706 Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Wed, 5 Jun 2024 22:27:34 -0700 Subject: [PATCH 49/64] ldns_dane_match_any_cert_with_data: fix types Both `i` and `n` should match the return type for `sk_X509_num` (which is `int`, not `size_t`). This addresses a potential issue where `sk_X509_num(..)` could return -1, resulting in an unnecessary number of loop iterations and undesirable behavior. Reported by: Coverity Signed-off-by: Enji Cooper --- dane.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dane.c b/dane.c index b8487b53..1bf4862f 100644 --- a/dane.c +++ b/dane.c @@ -625,10 +625,10 @@ ldns_dane_match_any_cert_with_data(STACK_OF(X509)* chain, ldns_rdf* data, bool ca) { ldns_status s = LDNS_STATUS_DANE_TLSA_DID_NOT_MATCH; - size_t n, i; + int n, i; X509* cert; - n = (size_t)sk_X509_num(chain); + n = sk_X509_num(chain); for (i = 0; i < n; i++) { cert = sk_X509_pop(chain); if (! cert) { From 6a9802e5b1ecd15e23048c51c8c3421f81daccee Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 12 Jul 2024 13:38:43 +0200 Subject: [PATCH 50/64] RESINFO became RFC --- configure.ac | 8 ++++---- ldns/rr.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index fab57fbc..25435273 100644 --- a/configure.ac +++ b/configure.ac @@ -731,12 +731,12 @@ case "$enable_rrtype_svcb_https" in AC_DEFINE_UNQUOTED([RRTYPE_SVCB_HTTPS], [], [Define this to enable RR types SVCB and HTTPS.]) ;; esac -AC_ARG_ENABLE(rrtype-resinfo, AS_HELP_STRING([--enable-rrtype-resinfo],[Enable RR type RESINFO.])) +AC_ARG_ENABLE(rrtype-resinfo, AS_HELP_STRING([--enable-rrtype-resinfo],[Disable RR type RESINFO.])) case "$enable_rrtype_resinfo" in - yes) - AC_DEFINE_UNQUOTED([RRTYPE_RESINFO], [], [Define this to enable RR type RESINFO.]) + no) ;; - no|*) + yes|*) + AC_DEFINE_UNQUOTED([RRTYPE_RESINFO], [], [Define this to enable RR type RESINFO.]) ;; esac diff --git a/ldns/rr.h b/ldns/rr.h index a42ff7a6..9431c6f4 100644 --- a/ldns/rr.h +++ b/ldns/rr.h @@ -228,7 +228,7 @@ enum ldns_enum_rr_type /** RFC 8777 **/ LDNS_RR_TYPE_AMTRELAY = 260, - /** draft-ietf-add-resolver-info */ + /** RFC 9606 */ LDNS_RR_TYPE_RESINFO = 261, /** DNSSEC Trust Authorities */ From df7ce1a5ae6a207b7055cb33ec0aacf5a913b6cc Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 12 Jul 2024 14:01:35 +0200 Subject: [PATCH 51/64] Add WALLET rrtype --- Changelog | 3 ++- ldns/rr.h | 5 ++++- rr.c | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index f17bd82f..5cfabc3f 100644 --- a/Changelog +++ b/Changelog @@ -13,7 +13,8 @@ libssp-0.dll and ldns-config. * bugfix #237: Resolver uses nameserver commented out in /etc/resolv.conf. Thanks grembo. - * Added RESINFO draft rrtype. Enable with --enable-rrtype-resinfo + * Added RESINFO rrtype. + * Added WALLET rrtype. 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. diff --git a/ldns/rr.h b/ldns/rr.h index 9431c6f4..8f267b87 100644 --- a/ldns/rr.h +++ b/ldns/rr.h @@ -231,6 +231,9 @@ enum ldns_enum_rr_type /** RFC 9606 */ LDNS_RR_TYPE_RESINFO = 261, + /** https://iana.org/assignments/dns-parameters/WALLET/wallet-completed-template */ + LDNS_RR_TYPE_WALLET = 262, + /** DNSSEC Trust Authorities */ LDNS_RR_TYPE_TA = 32768, /* RFC 4431, 5074, DNSSEC Lookaside Validation */ @@ -246,7 +249,7 @@ enum ldns_enum_rr_type typedef enum ldns_enum_rr_type ldns_rr_type; /* The first fields are contiguous and can be referenced instantly */ -#define LDNS_RDATA_FIELD_DESCRIPTORS_COMMON (LDNS_RR_TYPE_RESINFO + 1) +#define LDNS_RDATA_FIELD_DESCRIPTORS_COMMON (LDNS_RR_TYPE_WALLET + 1) /** * Resource Record diff --git a/rr.c b/rr.c index a9582b10..4526d0ce 100644 --- a/rr.c +++ b/rr.c @@ -2494,7 +2494,8 @@ static ldns_rr_descriptor rdata_field_descriptors[] = { #else {LDNS_RR_TYPE_NULL, "TYPE261", 1, 1, type_0_wireformat, LDNS_RDF_TYPE_NONE, LDNS_RR_NO_COMPRESS, 0 }, #endif - + /* 262 */ + {LDNS_RR_TYPE_WALLET, "TXT", 1, 0, NULL, LDNS_RDF_TYPE_STR, LDNS_RR_NO_COMPRESS, 0 }, /* split in array, no longer contiguous */ From 70f2dbdad2b022e299c534ab87eb89d692e4a5b0 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 12 Jul 2024 14:02:23 +0200 Subject: [PATCH 52/64] Release 1.8.4 this month --- Changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 5cfabc3f..17a6eef6 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,4 @@ -1.8.4 2024-??-?? +1.8.4 2024-07-?? * Fix building documentation in build directory. Thanks Michael Tokarev * Updated the configure script for split openssl directories. From b433f1af243a4297033fac085fe7f7fd9b850a85 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 12 Jul 2024 14:05:16 +0200 Subject: [PATCH 53/64] Bump version --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 25435273..9bf9823f 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ sinclude(acx_nlnetlabs.m4) # must be numbers. ac_defun because of later processing. m4_define([VERSION_MAJOR],[1]) m4_define([VERSION_MINOR],[8]) -m4_define([VERSION_MICRO],[3]) +m4_define([VERSION_MICRO],[4]) AC_INIT([ldns],m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]),[dns-team@nlnetlabs.nl],[libdns]) AC_CONFIG_SRCDIR([packet.c]) # needed to build correct soname @@ -34,7 +34,7 @@ AC_SUBST(LDNS_VERSION_MICRO, [VERSION_MICRO]) # ldns-1.8.2 had libversion 7:0:4 # ldns-1.8.3 has libversion 8:0:5 # -AC_SUBST(VERSION_INFO, [8:0:5]) +AC_SUBST(VERSION_INFO, [9:0:6]) AC_USE_SYSTEM_EXTENSIONS if test "$ac_cv_header_minix_config_h" = "yes"; then From c759816fa1be3b935b2b2403bc7e6d379074dba1 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 12 Jul 2024 14:09:46 +0200 Subject: [PATCH 54/64] Attribute Enji Cooper for PR #241 --- Changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/Changelog b/Changelog index 17a6eef6..b52c3f69 100644 --- a/Changelog +++ b/Changelog @@ -15,6 +15,7 @@ /etc/resolv.conf. Thanks grembo. * Added RESINFO rrtype. * Added WALLET rrtype. + * PR#241: Fix coverity cited problems. Thanks Enji Cooper. 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. From 65a9abc1c046b157d8fccbed4ce6c3af57e64843 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 12 Jul 2024 14:15:40 +0200 Subject: [PATCH 55/64] Attribute florian for Swig work --- Changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index b52c3f69..8245a4b3 100644 --- a/Changelog +++ b/Changelog @@ -15,7 +15,8 @@ /etc/resolv.conf. Thanks grembo. * Added RESINFO rrtype. * Added WALLET rrtype. - * PR#241: Fix coverity cited problems. Thanks Enji Cooper. + * PR #241: Fix coverity cited problems. Thanks Enji Cooper. + * PR #233: Several Python SWIG issues. Thanks Florian Weimer. 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. From 137eb843de07af24ddca927dab65c8f365a70054 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 12 Jul 2024 14:21:04 +0200 Subject: [PATCH 56/64] Attribute William and Fabrice --- Changelog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Changelog b/Changelog index 8245a4b3..6616e694 100644 --- a/Changelog +++ b/Changelog @@ -17,6 +17,10 @@ * Added WALLET rrtype. * PR #241: Fix coverity cited problems. Thanks Enji Cooper. * PR #233: Several Python SWIG issues. Thanks Florian Weimer. + * PR #231: const ldns_rdf * typemap fixes to support swig-4.2.0 + Thanks William S Fulton + * PR #227: keys.c: fix build with libressl >= 3.8.1 + Thanks Fabrice Fontaine 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. From bc751c116dcf21fa1db9a83b42490c57c699a943 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 12 Jul 2024 14:27:07 +0200 Subject: [PATCH 57/64] =?UTF-8?q?Attribute=20=C3=98rjan=20Malde?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changelog b/Changelog index 6616e694..e4470148 100644 --- a/Changelog +++ b/Changelog @@ -21,6 +21,8 @@ Thanks William S Fulton * PR #227: keys.c: fix build with libressl >= 3.8.1 Thanks Fabrice Fontaine + * PR #224: Portable executable progs don't underlink to libldns + Thanks Ørjan Malde 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. From aab2b416941179b6aa7b4ed23291e14e036e76b9 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 12 Jul 2024 14:34:41 +0200 Subject: [PATCH 58/64] Attribute Ed --- Changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changelog b/Changelog index e4470148..509644f1 100644 --- a/Changelog +++ b/Changelog @@ -23,6 +23,8 @@ Thanks Fabrice Fontaine * PR #224: Portable executable progs don't underlink to libldns Thanks Ørjan Malde + * PR #216 Update declaration for function with no argument + Thanks Ed Maste 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. From a05aedb384acca69378bc348acb1d19f4bd0f31b Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 12 Jul 2024 14:42:50 +0200 Subject: [PATCH 59/64] Fix small mistake and attribute Pierre --- Changelog | 2 ++ str2host.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 509644f1..8cb39ddf 100644 --- a/Changelog +++ b/Changelog @@ -25,6 +25,8 @@ Thanks Ørjan Malde * PR #216 Update declaration for function with no argument Thanks Ed Maste + * PR #214 fix the build in FreeBSD's base system + Thanks Pierre Pronchery and Dag-Erling Smørgrav 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. diff --git a/str2host.c b/str2host.c index 4617aa3c..5b78e5bc 100644 --- a/str2host.c +++ b/str2host.c @@ -2198,7 +2198,7 @@ static const size_t svcparam_key_defs_len = sizeof(svcparam_key_defs) /* svcparam_key2buffer_str() should actually be in host2str.c, but we need the * svcparam_key_defs for it and it is not an exposed symbol anyway. */ -static ldns_status svcparam_key2buffer_str(ldns_buffer *output, uint16_t key) +ldns_status svcparam_key2buffer_str(ldns_buffer *output, uint16_t key) { if (key <= LDNS_SVCPARAM_KEY_LAST_KEY) ldns_buffer_write_string(output, svcparam_key_defs[key].str); From 17088bab6411d30e59e58c10a4fb41ba6ef5739a Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 12 Jul 2024 14:45:51 +0200 Subject: [PATCH 60/64] Attribute Jelte --- Changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changelog b/Changelog index 8cb39ddf..60844bc1 100644 --- a/Changelog +++ b/Changelog @@ -27,6 +27,8 @@ Thanks Ed Maste * PR #214 fix the build in FreeBSD's base system Thanks Pierre Pronchery and Dag-Erling Smørgrav + * PR #206 improve 'next-label' algorithm in ldns-walk + Thanks Jelte Jansen 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. From 91a45adb8eca0250aacc2be24ba250a853ce06d1 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 12 Jul 2024 14:57:10 +0200 Subject: [PATCH 61/64] Attribute Roland and a small dereferencing void * fix --- Changelog | 8 +++++--- edns.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Changelog b/Changelog index 60844bc1..ae1bfc2b 100644 --- a/Changelog +++ b/Changelog @@ -23,12 +23,14 @@ Thanks Fabrice Fontaine * PR #224: Portable executable progs don't underlink to libldns Thanks Ørjan Malde - * PR #216 Update declaration for function with no argument + * PR #216: Update declaration for function with no argument Thanks Ed Maste - * PR #214 fix the build in FreeBSD's base system + * PR #214: fix the build in FreeBSD's base system Thanks Pierre Pronchery and Dag-Erling Smørgrav - * PR #206 improve 'next-label' algorithm in ldns-walk + * PR #206: improve 'next-label' algorithm in ldns-walk Thanks Jelte Jansen + * PR #205: Add functions to extract RFC 8914 extended errors + Thanks Roland van Rijswijk-Deij 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. diff --git a/edns.c b/edns.c index 87ca547e..18615ec2 100644 --- a/edns.c +++ b/edns.c @@ -74,7 +74,7 @@ ldns_edns_ede_get_text(const ldns_edns_option* edns, char **ede_text) *ede_text = (char*) malloc((edns->_size - 1) * sizeof(char)); memset(*ede_text, 0, edns->_size - 1); - memcpy(*ede_text, &edns->_data[2], edns->_size - 2); + memcpy(*ede_text, &((char*)edns->_data)[2], edns->_size - 2); } return LDNS_STATUS_OK; From 282fd2414b5e7f57e9f462948cb6587631affac1 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 12 Jul 2024 15:07:53 +0200 Subject: [PATCH 62/64] Attribute Felipe And the BSD's don't like sudo --- .github/workflows/testsuite.yml | 2 +- Changelog | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index 1b27aba5..a6eaa2dc 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -125,7 +125,7 @@ jobs: shell: bash run: | export DUMMY12345=1 ${{ matrix.os.env }} - sudo ${{ matrix.os.pkginstall }} + sudo ${{ matrix.os.pkginstall }} || ${{ matrix.os.pkginstall }} libtoolize -vci autoreconf -vfi ./configure ${{ matrix.os.configure_args }} diff --git a/Changelog b/Changelog index ae1bfc2b..c3ea086a 100644 --- a/Changelog +++ b/Changelog @@ -31,6 +31,8 @@ Thanks Jelte Jansen * PR #205: Add functions to extract RFC 8914 extended errors Thanks Roland van Rijswijk-Deij + * PR #203: Expand CI: Cygwin, BSDs, musl libc, 32-bit, and big-endian + Thanks Felipe Gasper 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. From 66e1a11cca774341c729971642e9285f7c88e368 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 12 Jul 2024 15:11:29 +0200 Subject: [PATCH 63/64] Okay, BSDs just dont run... --- .github/workflows/testsuite.yml | 46 ++++++++++++++++----------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index a6eaa2dc..7c540475 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -89,29 +89,29 @@ jobs: - name: "${{ matrix.platform }}: Build and test" run: docker run --rm --interactive --mount type=bind,source=$(pwd),target=/host ${{ matrix.platform }}/alpine sh -c "apk add make gcc libc-dev libtool automake autoconf openssl-dev m4 indent bash bind-tools && cd /host && libtoolize -vci && autoreconf -vfi && ./configure && make test" - BSDs: - name: ${{ matrix.os.dispname }} ${{ matrix.os.version }} - - runs-on: macos-latest - - strategy: - fail-fast: false - matrix: - os: - - name: freebsd - dispname: FreeBSD - version: '13.0' - pkginstall: pkg install -y libtool automake bind-tools gmake gindent - env: - configure_args: - - # OpenBSD seems to require explicit auto* versions. - - name: openbsd - dispname: OpenBSD - version: '7.1' - pkginstall: pkg_add -v libtool gmake gindent automake-1.16.3 autoconf-2.71 - env: AUTOCONF_VERSION=2.71 AUTOMAKE_VERSION=1.16 - configure_args: --disable-dane-verify +# BSDs: +# name: ${{ matrix.os.dispname }} ${{ matrix.os.version }} +# +# runs-on: macos-latest +# +# strategy: +# fail-fast: false +# matrix: +# os: +# - name: freebsd +# dispname: FreeBSD +# version: '13.0' +# pkginstall: pkg install -y libtool automake bind-tools gmake gindent +# env: +# configure_args: +# +# # OpenBSD seems to require explicit auto* versions. +# - name: openbsd +# dispname: OpenBSD +# version: '7.1' +# pkginstall: pkg_add -v libtool gmake gindent automake-1.16.3 autoconf-2.71 +# env: AUTOCONF_VERSION=2.71 AUTOMAKE_VERSION=1.16 +# configure_args: --disable-dane-verify steps: - uses: actions/checkout@main From 8d76771999f040fa8ad8879a841b413b4507e747 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Fri, 12 Jul 2024 15:12:31 +0200 Subject: [PATCH 64/64] BSDs dont work part 2 --- .github/workflows/testsuite.yml | 36 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index 7c540475..57ca9865 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -112,21 +112,21 @@ jobs: # pkginstall: pkg_add -v libtool gmake gindent automake-1.16.3 autoconf-2.71 # env: AUTOCONF_VERSION=2.71 AUTOMAKE_VERSION=1.16 # configure_args: --disable-dane-verify - - steps: - - uses: actions/checkout@main - with: - submodules: recursive - - name: Build and test on ${{ matrix.os.name }} - uses: cross-platform-actions/action@master - with: - operating_system: ${{ matrix.os.name }} - version: ${{ matrix.os.version }} - shell: bash - run: | - export DUMMY12345=1 ${{ matrix.os.env }} - sudo ${{ matrix.os.pkginstall }} || ${{ matrix.os.pkginstall }} - libtoolize -vci - autoreconf -vfi - ./configure ${{ matrix.os.configure_args }} - gmake test +# +# steps: +# - uses: actions/checkout@main +# with: +# submodules: recursive +# - name: Build and test on ${{ matrix.os.name }} +# uses: cross-platform-actions/action@master +# with: +# operating_system: ${{ matrix.os.name }} +# version: ${{ matrix.os.version }} +# shell: bash +# run: | +# export DUMMY12345=1 ${{ matrix.os.env }} +# sudo ${{ matrix.os.pkginstall }} || ${{ matrix.os.pkginstall }} +# libtoolize -vci +# autoreconf -vfi +# ./configure ${{ matrix.os.configure_args }} +# gmake test