Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/mpl/bind Merge changes between bind 9.16.15 and 9.1...
details: https://anonhg.NetBSD.org/src/rev/7848e5566c44
branches: trunk
changeset: 1023009:7848e5566c44
user: christos <christos%NetBSD.org@localhost>
date: Thu Aug 19 11:50:14 2021 +0000
description:
Merge changes between bind 9.16.15 and 9.16.20 and restore dns client APIs
needed by dhcpd.
diffstat:
external/mpl/bind/Makefile.inc | 8 +-
external/mpl/bind/dist/Makefile.in | 4 +-
external/mpl/bind/dist/bin/delv/delv.c | 19 +-
external/mpl/bind/dist/bin/dig/dighost.c | 61 +-
external/mpl/bind/dist/bin/dig/host.c | 7 +-
external/mpl/bind/dist/bin/dnssec/dnssec-signzone.c | 41 +-
external/mpl/bind/dist/bin/dnssec/dnssectool.c | 4 +-
external/mpl/bind/dist/bin/named/config.c | 45 +-
external/mpl/bind/dist/bin/named/controlconf.c | 6 +-
external/mpl/bind/dist/bin/named/include/named/config.h | 11 +-
external/mpl/bind/dist/bin/named/main.c | 70 +-
external/mpl/bind/dist/bin/named/server.c | 201 +-
external/mpl/bind/dist/bin/named/unix/os.c | 4 +-
external/mpl/bind/dist/bin/named/zoneconf.c | 101 +-
external/mpl/bind/dist/bin/nsupdate/nsupdate.c | 55 +-
external/mpl/bind/dist/bin/rndc/rndc.c | 8 +-
external/mpl/bind/dist/bin/tests/optional/adb_test.c | 45 +-
external/mpl/bind/dist/bin/tests/optional/byaddr_test.c | 34 +-
external/mpl/bind/dist/bin/tests/optional/byname_test.c | 32 +-
external/mpl/bind/dist/bin/tests/optional/gsstest.c | 40 +-
external/mpl/bind/dist/bin/tests/optional/ratelimiter_test.c | 8 +-
external/mpl/bind/dist/bin/tests/optional/shutdown_test.c | 28 +-
external/mpl/bind/dist/bin/tests/optional/sig0_test.c | 36 +-
external/mpl/bind/dist/bin/tests/optional/sock_test.c | 46 +-
external/mpl/bind/dist/bin/tests/optional/task_test.c | 20 +-
external/mpl/bind/dist/bin/tests/optional/timer_test.c | 18 +-
external/mpl/bind/dist/bin/tests/optional/zone_test.c | 8 +-
external/mpl/bind/dist/bin/tests/system/checkconf/bad-kasp1.conf | 22 -
external/mpl/bind/dist/bin/tests/system/checkconf/bad-kasp5.conf | 22 -
external/mpl/bind/dist/bin/tests/system/checkds/dig.bat | 32 -
external/mpl/bind/dist/bin/tests/system/checkds/dig.pl | 39 -
external/mpl/bind/dist/bin/tests/system/checkds/dig.sh | 22 -
external/mpl/bind/dist/bin/tests/system/checkds/missing.example.dnskey.db | 3 -
external/mpl/bind/dist/bin/tests/system/checkds/missing.example.ds.db | 2 -
external/mpl/bind/dist/bin/tests/system/checkds/none.example.dnskey.db | 3 -
external/mpl/bind/dist/bin/tests/system/checkds/ok.example.dnskey.db | 2 -
external/mpl/bind/dist/bin/tests/system/checkds/ok.example.ds.db | 2 -
external/mpl/bind/dist/bin/tests/system/checkds/prep.example.db | 121 -
external/mpl/bind/dist/bin/tests/system/checkds/prep.example.ds.db | 2 -
external/mpl/bind/dist/bin/tests/system/checkds/tests.sh | 115 -
external/mpl/bind/dist/bin/tests/system/checkds/wrong.example.dnskey.db | 2 -
external/mpl/bind/dist/bin/tests/system/checkds/wrong.example.ds.db | 2 -
external/mpl/bind/dist/bin/tests/system/dyndb/driver/driver.c | 9 +-
external/mpl/bind/dist/bin/tests/system/nsupdate/ns8/dns.keytab | Bin
external/mpl/bind/dist/bin/tests/system/pipelined/pipequeries.c | 57 +-
external/mpl/bind/dist/bin/tests/system/resolve.c | 2 +-
external/mpl/bind/dist/bin/tests/system/serve-stale/ns3/named.conf.in | 37 -
external/mpl/bind/dist/bin/tests/system/tkey/keycreate.c | 67 +-
external/mpl/bind/dist/bin/tests/system/tkey/keydelete.c | 66 +-
external/mpl/bind/dist/bin/tools/mdig.c | 76 +-
external/mpl/bind/dist/bin/tools/named-journalprint.c | 19 +-
external/mpl/bind/dist/config.h.in | 33 +-
external/mpl/bind/dist/configure | 415 +-
external/mpl/bind/dist/lib/bind9/check.c | 283 +-
external/mpl/bind/dist/lib/dns/cache.c | 5 +-
external/mpl/bind/dist/lib/dns/client.c | 106 +-
external/mpl/bind/dist/lib/dns/dnssec.c | 82 +-
external/mpl/bind/dist/lib/dns/dst_api.c | 203 +-
external/mpl/bind/dist/lib/dns/dst_internal.h | 3 +-
external/mpl/bind/dist/lib/dns/dst_parse.c | 4 +-
external/mpl/bind/dist/lib/dns/dyndb.c | 13 +-
external/mpl/bind/dist/lib/dns/include/dns/client.h | 15 +-
external/mpl/bind/dist/lib/dns/include/dns/db.h | 11 +-
external/mpl/bind/dist/lib/dns/include/dns/diff.h | 9 +-
external/mpl/bind/dist/lib/dns/include/dns/dyndb.h | 4 +-
external/mpl/bind/dist/lib/dns/include/dns/events.h | 3 +-
external/mpl/bind/dist/lib/dns/include/dns/keymgr.h | 10 +-
external/mpl/bind/dist/lib/dns/include/dns/masterdump.h | 34 +-
external/mpl/bind/dist/lib/dns/include/dns/message.h | 25 +-
external/mpl/bind/dist/lib/dns/include/dns/name.h | 27 +-
external/mpl/bind/dist/lib/dns/include/dns/nsec3.h | 19 +-
external/mpl/bind/dist/lib/dns/include/dns/rdata.h | 4 +-
external/mpl/bind/dist/lib/dns/include/dns/rdataset.h | 10 +-
external/mpl/bind/dist/lib/dns/include/dns/rpz.h | 11 +-
external/mpl/bind/dist/lib/dns/include/dns/zone.h | 200 +-
external/mpl/bind/dist/lib/dns/include/dst/dst.h | 15 +-
external/mpl/bind/dist/lib/dns/journal.c | 282 +-
external/mpl/bind/dist/lib/dns/keymgr.c | 159 +-
external/mpl/bind/dist/lib/dns/masterdump.c | 212 +-
external/mpl/bind/dist/lib/dns/message.c | 170 +-
external/mpl/bind/dist/lib/dns/name.c | 11 +-
external/mpl/bind/dist/lib/dns/nsec3.c | 84 +-
external/mpl/bind/dist/lib/dns/openssl_link.c | 3 +-
external/mpl/bind/dist/lib/dns/rbt.c | 31 +-
external/mpl/bind/dist/lib/dns/rbtdb.c | 243 +-
external/mpl/bind/dist/lib/dns/rcode.c | 6 +-
external/mpl/bind/dist/lib/dns/rdata.c | 27 +-
external/mpl/bind/dist/lib/dns/rdata/generic/avc_258.c | 28 +-
external/mpl/bind/dist/lib/dns/rdata/generic/cdnskey_60.c | 14 +-
external/mpl/bind/dist/lib/dns/rdata/generic/cds_59.c | 15 +-
external/mpl/bind/dist/lib/dns/rdata/generic/dlv_32769.c | 15 +-
external/mpl/bind/dist/lib/dns/rdata/generic/dnskey_48.c | 14 +-
external/mpl/bind/dist/lib/dns/rdata/generic/ds_43.c | 15 +-
external/mpl/bind/dist/lib/dns/rdata/generic/key_25.c | 14 +-
external/mpl/bind/dist/lib/dns/rdata/generic/keydata_65533.c | 20 +-
external/mpl/bind/dist/lib/dns/rdata/generic/ninfo_56.c | 28 +-
external/mpl/bind/dist/lib/dns/rdata/generic/rkey_57.c | 14 +-
external/mpl/bind/dist/lib/dns/rdata/generic/smimea_53.c | 15 +-
external/mpl/bind/dist/lib/dns/rdata/generic/spf_99.c | 28 +-
external/mpl/bind/dist/lib/dns/rdata/generic/ta_32768.c | 14 +-
external/mpl/bind/dist/lib/dns/rdata/generic/tlsa_52.c | 14 +-
external/mpl/bind/dist/lib/dns/rdata/generic/txt_16.c | 15 +-
external/mpl/bind/dist/lib/dns/rdata/generic/x25_19.c | 7 +-
external/mpl/bind/dist/lib/dns/rdata/generic/zonemd_63.c | 79 +-
external/mpl/bind/dist/lib/dns/rdata/generic/zonemd_63.h | 9 +-
external/mpl/bind/dist/lib/dns/rdata/in_1/atma_34.c | 6 +-
external/mpl/bind/dist/lib/dns/resolver.c | 3 +-
external/mpl/bind/dist/lib/dns/tests/db_test.c | 9 +-
external/mpl/bind/dist/lib/dns/tests/dnstest.c | 25 +-
external/mpl/bind/dist/lib/dns/tests/nsec3_test.c | 11 +-
external/mpl/bind/dist/lib/dns/tests/rbtdb_test.c | 2 +-
external/mpl/bind/dist/lib/dns/tests/rdata_test.c | 202 +-
external/mpl/bind/dist/lib/dns/tests/update_test.c | 39 +-
external/mpl/bind/dist/lib/dns/tkey.c | 24 +-
external/mpl/bind/dist/lib/dns/tsig.c | 11 +-
external/mpl/bind/dist/lib/dns/update.c | 36 +-
external/mpl/bind/dist/lib/dns/validator.c | 38 +-
external/mpl/bind/dist/lib/dns/xfrin.c | 30 +-
external/mpl/bind/dist/lib/dns/zone.c | 2578 +++++++--
external/mpl/bind/dist/lib/dns/zoneverify.c | 24 +-
external/mpl/bind/dist/lib/irs/context.c | 43 +-
external/mpl/bind/dist/lib/irs/getnameinfo.c | 7 +-
external/mpl/bind/dist/lib/isc/app.c | 4 +-
external/mpl/bind/dist/lib/isc/include/isc/app.h | 13 +-
external/mpl/bind/dist/lib/isc/include/isc/barrier.h | 2 +-
external/mpl/bind/dist/lib/isc/include/isc/managers.h | 2 +-
external/mpl/bind/dist/lib/isc/include/isc/mem.h | 49 +-
external/mpl/bind/dist/lib/isc/include/isc/netmgr.h | 115 +-
external/mpl/bind/dist/lib/isc/include/isc/result.h | 7 +-
external/mpl/bind/dist/lib/isc/include/isc/socket.h | 46 +-
external/mpl/bind/dist/lib/isc/include/isc/task.h | 203 +-
external/mpl/bind/dist/lib/isc/include/isc/taskpool.h | 19 +-
external/mpl/bind/dist/lib/isc/include/isc/timer.h | 40 +-
external/mpl/bind/dist/lib/isc/include/isc/tls.h | 50 -
external/mpl/bind/dist/lib/isc/include/isc/types.h | 33 +-
external/mpl/bind/dist/lib/isc/include/isc/url.h | 2 +-
external/mpl/bind/dist/lib/isc/include/isc/util.h | 73 +-
external/mpl/bind/dist/lib/isc/lib.c | 7 +-
external/mpl/bind/dist/lib/isc/managers.c | 2 +-
external/mpl/bind/dist/lib/isc/mem.c | 36 +-
external/mpl/bind/dist/lib/isc/netmgr/netmgr-int.h | 320 +-
external/mpl/bind/dist/lib/isc/netmgr/netmgr.c | 1094 ++-
external/mpl/bind/dist/lib/isc/netmgr/tcp.c | 517 +-
external/mpl/bind/dist/lib/isc/netmgr/tcpdns.c | 375 +-
external/mpl/bind/dist/lib/isc/netmgr/tlsdns.c | 1938 -------
external/mpl/bind/dist/lib/isc/netmgr/udp.c | 367 +-
external/mpl/bind/dist/lib/isc/netmgr/uv-compat.c | 10 +-
external/mpl/bind/dist/lib/isc/netmgr/uv-compat.h | 58 +-
external/mpl/bind/dist/lib/isc/netmgr/uverr2result.c | 4 +-
external/mpl/bind/dist/lib/isc/netmgr_p.h | 2 +-
external/mpl/bind/dist/lib/isc/result.c | 150 +-
external/mpl/bind/dist/lib/isc/rwlock.c | 9 +-
external/mpl/bind/dist/lib/isc/stats.c | 6 +-
external/mpl/bind/dist/lib/isc/task.c | 1266 +---
external/mpl/bind/dist/lib/isc/task_p.h | 102 +-
external/mpl/bind/dist/lib/isc/taskpool.c | 31 +-
external/mpl/bind/dist/lib/isc/tests/isctest.c | 31 +-
external/mpl/bind/dist/lib/isc/tests/netmgr_test.c | 2 +-
external/mpl/bind/dist/lib/isc/tests/quota_test.c | 6 +-
external/mpl/bind/dist/lib/isc/tests/task_test.c | 123 +-
external/mpl/bind/dist/lib/isc/tests/taskpool_test.c | 45 +-
external/mpl/bind/dist/lib/isc/tests/tcp_quota_test.c | 738 --
external/mpl/bind/dist/lib/isc/tests/tcp_test.c | 1050 ----
external/mpl/bind/dist/lib/isc/tests/tcpdns_test.c | 877 ---
external/mpl/bind/dist/lib/isc/tests/timer_test.c | 94 +-
external/mpl/bind/dist/lib/isc/tests/tlsdns_test.c | 899 ---
external/mpl/bind/dist/lib/isc/tests/udp_test.c | 894 ---
external/mpl/bind/dist/lib/isc/tests/uv_wrap.h | 20 +-
external/mpl/bind/dist/lib/isc/timer.c | 123 +-
external/mpl/bind/dist/lib/isc/tls.c | 2 +-
external/mpl/bind/dist/lib/isc/tm.c | 4 +-
external/mpl/bind/dist/lib/isc/trampoline_p.h | 2 +-
external/mpl/bind/dist/lib/isc/unix/dir.c | 4 +-
external/mpl/bind/dist/lib/isc/unix/include/isc/stdatomic.h | 6 +-
external/mpl/bind/dist/lib/isc/unix/socket.c | 425 +-
external/mpl/bind/dist/lib/isc/url.c | 2 +-
external/mpl/bind/dist/lib/isc/win32/DLLMain.c | 3 +-
external/mpl/bind/dist/lib/isc/win32/dir.c | 4 +-
external/mpl/bind/dist/lib/isc/win32/file.c | 4 +-
external/mpl/bind/dist/lib/isc/win32/include/isc/time.h | 32 +-
external/mpl/bind/dist/lib/isc/win32/socket.c | 23 +-
external/mpl/bind/dist/lib/isc/win32/time.c | 106 +-
external/mpl/bind/dist/lib/isccfg/kaspconf.c | 16 +-
external/mpl/bind/dist/lib/isccfg/namedconf.c | 58 +-
external/mpl/bind/dist/lib/ns/client.c | 128 +-
external/mpl/bind/dist/lib/ns/include/ns/query.h | 41 +-
external/mpl/bind/dist/lib/ns/interfacemgr.c | 13 +-
external/mpl/bind/dist/lib/ns/query.c | 134 +-
external/mpl/bind/dist/lib/ns/tests/nstest.c | 40 +-
external/mpl/bind/dist/lib/ns/update.c | 11 +-
external/mpl/bind/dist/lib/ns/xfrout.c | 4 +-
external/mpl/bind/dist/lib/samples/Makefile-postinstall.in | 66 -
external/mpl/bind/dist/lib/samples/Makefile.in | 86 -
external/mpl/bind/dist/lib/samples/nsprobe.c | 1235 ----
external/mpl/bind/dist/lib/samples/resolve.c | 498 -
external/mpl/bind/dist/lib/samples/rootkey.sh | 26 -
external/mpl/bind/dist/lib/samples/sample-async.c | 411 -
external/mpl/bind/dist/lib/samples/sample-gai.c | 73 -
external/mpl/bind/dist/lib/samples/sample-request.c | 250 -
external/mpl/bind/dist/lib/samples/sample-update.c | 782 ---
external/mpl/bind/dist/lib/samples/win32/async.vcxproj.filters.in | 22 -
external/mpl/bind/dist/lib/samples/win32/async.vcxproj.in | 119 -
external/mpl/bind/dist/lib/samples/win32/async.vcxproj.user | 3 -
external/mpl/bind/dist/lib/samples/win32/gai.vcxproj.filters.in | 22 -
external/mpl/bind/dist/lib/samples/win32/gai.vcxproj.in | 119 -
external/mpl/bind/dist/lib/samples/win32/gai.vcxproj.user | 3 -
external/mpl/bind/dist/lib/samples/win32/nsprobe.vcxproj.filters.in | 22 -
external/mpl/bind/dist/lib/samples/win32/nsprobe.vcxproj.in | 119 -
external/mpl/bind/dist/lib/samples/win32/nsprobe.vcxproj.user | 3 -
external/mpl/bind/dist/lib/samples/win32/request.vcxproj.filters.in | 22 -
external/mpl/bind/dist/lib/samples/win32/request.vcxproj.in | 119 -
external/mpl/bind/dist/lib/samples/win32/request.vcxproj.user | 3 -
external/mpl/bind/dist/lib/samples/win32/resolve.vcxproj.filters.in | 22 -
external/mpl/bind/dist/lib/samples/win32/resolve.vcxproj.in | 119 -
external/mpl/bind/dist/lib/samples/win32/resolve.vcxproj.user | 3 -
external/mpl/bind/dist/lib/samples/win32/update.vcxproj.filters.in | 22 -
external/mpl/bind/dist/lib/samples/win32/update.vcxproj.in | 119 -
external/mpl/bind/dist/lib/samples/win32/update.vcxproj.user | 3 -
external/mpl/bind/dist/win32utils/libuv.diff | 27 -
external/mpl/bind/include/config.h | 35 +-
external/mpl/bind/include/dns/rdatastruct.h | 7 +-
external/mpl/bind/include/irs/netdb.h | 2 +-
external/mpl/bind/include/isc/stdatomic.h | 6 +-
external/mpl/bind/lib/libbind9/shlib_version | 4 +-
external/mpl/bind/lib/libdns/shlib_version | 4 +-
external/mpl/bind/lib/libirs/shlib_version | 4 +-
external/mpl/bind/lib/libisc/Makefile | 6 +-
external/mpl/bind/lib/libisc/shlib_version | 4 +-
external/mpl/bind/lib/libisccc/shlib_version | 4 +-
external/mpl/bind/lib/libisccfg/shlib_version | 4 +-
external/mpl/bind/lib/libns/shlib_version | 4 +-
231 files changed, 7955 insertions(+), 17265 deletions(-)
diffs (truncated from 38535 to 300 lines):
diff -r 465b1231b17c -r 7848e5566c44 external/mpl/bind/Makefile.inc
--- a/external/mpl/bind/Makefile.inc Thu Aug 19 11:45:12 2021 +0000
+++ b/external/mpl/bind/Makefile.inc Thu Aug 19 11:50:14 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.11 2021/04/13 01:15:57 mrg Exp $
+# $NetBSD: Makefile.inc,v 1.12 2021/08/19 11:50:14 christos Exp $
.if !defined(BIND9_MAKEFILE_INC)
BIND9_MAKEFILE_INC=yes
@@ -72,16 +72,16 @@
LDADD+= -lbind9_g -lisccfg_g -ldns_g -lns_g -lirs_g
LDADD+= -lisccc_g -lisc_g
LDADD+= -L${LIBUVOBJDIR} -luv_g
-LDADD+= -lkvm_g -lz_g
+LDADD+= -lexecinfo_g -lkvm_g -lz_g
.else
LDADD+= -lbind9 -lisccfg -ldns -lns -lirs
DPADD+= ${LIBBIND9} ${LIBISCCFG} ${LIBDNS} ${LIBNS} ${LIBIRS}
LDADD+= -lisccc -lisc
LDADD+= -L${LIBUVOBJDIR} -luv
-LDADD+= -lkvm -lz
+LDADD+= -lexecinfo -lkvm -lz
DPADD+= ${LIBISCCC} ${LIBISC}
DPADD+= ${LIBUVOBJDIR}/libuv.a
-DPADD+= ${LIBKVM} ${LIBZ}
+DPADD+= ${LIBEXECINFO} ${LIBKVM} ${LIBZ}
.endif
.else
CPPFLAGS+= -DLIBINTERFACE=${LIBINTERFACE} \
diff -r 465b1231b17c -r 7848e5566c44 external/mpl/bind/dist/Makefile.in
--- a/external/mpl/bind/dist/Makefile.in Thu Aug 19 11:45:12 2021 +0000
+++ b/external/mpl/bind/dist/Makefile.in Thu Aug 19 11:50:14 2021 +0000
@@ -48,9 +48,7 @@
doc man:: ${MANOBJS}
installdirs:
- $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir} \
- ${DESTDIR}${localstatedir}/run ${DESTDIR}${sysconfdir}
- $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1
+ $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sysconfdir}
install:: installdirs
${INSTALL_DATA} ${top_srcdir}/bind.keys ${DESTDIR}${sysconfdir}
diff -r 465b1231b17c -r 7848e5566c44 external/mpl/bind/dist/bin/delv/delv.c
--- a/external/mpl/bind/dist/bin/delv/delv.c Thu Aug 19 11:45:12 2021 +0000
+++ b/external/mpl/bind/dist/bin/delv/delv.c Thu Aug 19 11:50:14 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: delv.c,v 1.9 2021/04/05 11:27:00 rillig Exp $ */
+/* $NetBSD: delv.c,v 1.10 2021/08/19 11:50:14 christos Exp $ */
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -35,6 +35,7 @@
#include <isc/hex.h>
#include <isc/lib.h>
#include <isc/log.h>
+#include <isc/managers.h>
#include <isc/md.h>
#include <isc/mem.h>
#ifdef WIN32
@@ -73,7 +74,6 @@
#include <isccfg/log.h>
#include <isccfg/namedconf.h>
-#include <irs/netdb.h>
#include <irs/resconf.h>
#define CHECK(r) \
@@ -1729,6 +1729,7 @@
dns_namelist_t namelist;
unsigned int resopt, clopt;
isc_appctx_t *actx = NULL;
+ isc_nm_t *netmgr = NULL;
isc_taskmgr_t *taskmgr = NULL;
isc_socketmgr_t *socketmgr = NULL;
isc_timermgr_t *timermgr = NULL;
@@ -1752,9 +1753,9 @@
isc_mem_create(&mctx);
CHECK(isc_appctx_create(mctx, &actx));
- CHECK(isc_taskmgr_createinctx(mctx, 1, 0, &taskmgr));
- CHECK(isc_socketmgr_createinctx(mctx, &socketmgr));
- CHECK(isc_timermgr_createinctx(mctx, &timermgr));
+ CHECK(isc_managers_create(mctx, 1, 0, &netmgr, &taskmgr));
+ CHECK(isc_socketmgr_create(mctx, &socketmgr));
+ CHECK(isc_timermgr_create(mctx, &timermgr));
parse_args(argc, argv);
@@ -1775,8 +1776,8 @@
/* Create client */
clopt = DNS_CLIENTCREATEOPT_USECACHE;
- result = dns_client_createx(mctx, actx, taskmgr, socketmgr, timermgr,
- clopt, &client, srcaddr4, srcaddr6);
+ result = dns_client_create(mctx, actx, taskmgr, socketmgr, timermgr,
+ clopt, &client, srcaddr4, srcaddr6);
if (result != ISC_R_SUCCESS) {
delv_log(ISC_LOG_ERROR, "dns_client_create: %s",
isc_result_totext(result));
@@ -1796,7 +1797,7 @@
CHECK(convert_name(&qfn, &query_name, qname));
/* Set up resolution options */
- resopt = DNS_CLIENTRESOPT_ALLOWRUN | DNS_CLIENTRESOPT_NOCDFLAG;
+ resopt = DNS_CLIENTRESOPT_NOCDFLAG;
if (no_sigs) {
resopt |= DNS_CLIENTRESOPT_NODNSSEC;
}
@@ -1859,7 +1860,7 @@
dns_client_destroy(&client);
}
if (taskmgr != NULL) {
- isc_taskmgr_destroy(&taskmgr);
+ isc_managers_destroy(&netmgr, &taskmgr);
}
if (timermgr != NULL) {
isc_timermgr_destroy(&timermgr);
diff -r 465b1231b17c -r 7848e5566c44 external/mpl/bind/dist/bin/dig/dighost.c
--- a/external/mpl/bind/dist/bin/dig/dighost.c Thu Aug 19 11:45:12 2021 +0000
+++ b/external/mpl/bind/dist/bin/dig/dighost.c Thu Aug 19 11:50:14 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dighost.c,v 1.11 2021/04/29 17:26:09 christos Exp $ */
+/* $NetBSD: dighost.c,v 1.12 2021/08/19 11:50:14 christos Exp $ */
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -43,6 +43,7 @@
#include <isc/hex.h>
#include <isc/lang.h>
#include <isc/log.h>
+#include <isc/managers.h>
#include <isc/netaddr.h>
#include <isc/netdb.h>
#include <isc/nonce.h>
@@ -100,6 +101,14 @@
#define NS_IN6ADDRSZ 16
#endif /* if !defined(NS_IN6ADDRSZ) */
+#if HAVE_SETLOCALE
+#define systemlocale(l) (void)setlocale(l, "")
+#define resetlocale(l) (void)setlocale(l, "C")
+#else
+#define systemlocale(l)
+#define resetlocale(l)
+#endif /* HAVE_SETLOCALE */
+
dig_lookuplist_t lookup_list;
dig_serverlist_t server_list;
dig_searchlistlist_t search_list;
@@ -113,6 +122,7 @@
unsigned int extrabytes;
isc_mem_t *mctx = NULL;
isc_log_t *lctx = NULL;
+isc_nm_t *netmgr = NULL;
isc_taskmgr_t *taskmgr = NULL;
isc_task_t *global_task = NULL;
isc_timermgr_t *timermgr = NULL;
@@ -1339,11 +1349,6 @@
irs_resconf_destroy(&resconf);
-#ifdef HAVE_SETLOCALE
- /* Set locale */
- (void)setlocale(LC_ALL, "");
-#endif /* ifdef HAVE_SETLOCALE */
-
if (keyfile[0] != 0) {
setup_file_key();
} else if (keysecret[0] != 0) {
@@ -1406,8 +1411,8 @@
isc_log_setdebuglevel(lctx, 0);
- result = isc_taskmgr_create(mctx, 1, 0, NULL, &taskmgr);
- check_result(result, "isc_taskmgr_create");
+ result = isc_managers_create(mctx, 1, 0, &netmgr, &taskmgr);
+ check_result(result, "isc_managers_create");
result = isc_task_create(taskmgr, 0, &global_task);
check_result(result, "isc_task_create");
@@ -2055,7 +2060,6 @@
result = dns_message_gettempname(lookup->sendmsg, &soaname);
check_result(result, "dns_message_gettempname");
- dns_name_init(soaname, NULL);
dns_name_clone(lookup->name, soaname);
ISC_LIST_INIT(soaname->list);
ISC_LIST_APPEND(soaname->list, rdataset, link);
@@ -2116,7 +2120,6 @@
}
result = dns_message_gettempname(lookup->sendmsg, &lookup->name);
check_result(result, "dns_message_gettempname");
- dns_name_init(lookup->name, NULL);
isc_buffer_init(&lookup->namebuf, lookup->name_space,
sizeof(lookup->name_space));
@@ -2160,7 +2163,6 @@
result = dns_message_gettempname(lookup->sendmsg,
&lookup->oname);
check_result(result, "dns_message_gettempname");
- dns_name_init(lookup->oname, NULL);
/* XXX Helper funct to conv char* to name? */
origin = lookup->origin->origin;
#ifdef HAVE_LIBIDN2
@@ -4353,13 +4355,10 @@
debug("freeing task");
isc_task_detach(&global_task);
}
- /*
- * The taskmgr_destroy() call blocks until all events are cleared
- * from the task.
- */
+
if (taskmgr != NULL) {
debug("freeing taskmgr");
- isc_taskmgr_destroy(&taskmgr);
+ isc_managers_destroy(&netmgr, &taskmgr);
}
LOCK_LOOKUP;
REQUIRE(sockcount == 0);
@@ -4424,8 +4423,9 @@
#ifdef HAVE_LIBIDN2
static isc_result_t
idn_output_filter(isc_buffer_t *buffer, unsigned int used_org) {
- char src[MXNAME], *dst;
+ char src[MXNAME], *dst = NULL;
size_t srclen, dstlen;
+ isc_result_t result = ISC_R_SUCCESS;
/*
* Copy name from 'buffer' to 'src' and terminate it with NULL.
@@ -4433,23 +4433,27 @@
srclen = isc_buffer_usedlength(buffer) - used_org;
if (srclen >= sizeof(src)) {
warn("Input name too long to perform IDN conversion");
- return (ISC_R_SUCCESS);
+ goto cleanup;
}
memmove(src, (char *)isc_buffer_base(buffer) + used_org, srclen);
src[srclen] = '\0';
+ systemlocale(LC_ALL);
+
/*
* Convert 'src' to the current locale's character encoding.
*/
idn_ace_to_locale(src, &dst);
+ resetlocale(LC_ALL);
+
/*
* Check whether the converted name will fit back into 'buffer'.
*/
dstlen = strlen(dst);
if (isc_buffer_length(buffer) < used_org + dstlen) {
- idn2_free(dst);
- return (ISC_R_NOSPACE);
+ result = ISC_R_NOSPACE;
+ goto cleanup;
}
/*
@@ -4462,9 +4466,12 @@
/*
* Clean up.
*/
- idn2_free(dst);
-
- return (ISC_R_SUCCESS);
+cleanup:
+ if (dst != NULL) {
+ idn2_free(dst);
+ }
+
+ return (result);
}
/*%
@@ -4480,6 +4487,8 @@
char *ascii_src;
int res;
+ systemlocale(LC_ALL);
+
/*
* We trust libidn2 to return an error if 'src' is too large to be a
* valid domain name.
@@ -4500,6 +4509,8 @@
(void)strlcpy(dst, final_src, dstlen);
idn2_free(ascii_src);
+
+ resetlocale(LC_ALL);
}
/*%
@@ -4514,6 +4525,8 @@
char *local_src, *utf8_src;
int res;
Home |
Main Index |
Thread Index |
Old Index