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 our changes between bind 9.16.12 and...



details:   https://anonhg.NetBSD.org/src/rev/338bf2ea99fd
branches:  trunk
changeset: 982857:338bf2ea99fd
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Apr 29 17:26:09 2021 +0000

description:
Merge our changes between bind 9.16.12 and 9.16.15

diffstat:

 external/mpl/bind/dist/bin/dig/dighost.c                                          |    23 +-
 external/mpl/bind/dist/bin/dig/host.c                                             |     8 +-
 external/mpl/bind/dist/bin/dnssec/dnssec-signzone.c                               |     8 +-
 external/mpl/bind/dist/bin/named/config.c                                         |     4 +-
 external/mpl/bind/dist/bin/named/main.c                                           |     6 +-
 external/mpl/bind/dist/bin/named/server.c                                         |   137 +-
 external/mpl/bind/dist/bin/nsupdate/nsupdate.c                                    |    18 +-
 external/mpl/bind/dist/bin/tests/fromhex.pl                                       |    45 -
 external/mpl/bind/dist/bin/tests/optional/gsstest.c                               |     6 +-
 external/mpl/bind/dist/bin/tests/optional/rwlock_test.c                           |     4 +-
 external/mpl/bind/dist/bin/tests/system/ecdsa/ns1/named.conf                      |    34 -
 external/mpl/bind/dist/bin/tests/system/ecdsa/ns2/named.conf                      |    34 -
 external/mpl/bind/dist/bin/tests/system/eddsa/ns1/named.conf                      |    34 -
 external/mpl/bind/dist/bin/tests/system/eddsa/ns2/Xexample.com.+016+09713.key     |     1 -
 external/mpl/bind/dist/bin/tests/system/eddsa/ns2/Xexample.com.+016+09713.private |     3 -
 external/mpl/bind/dist/bin/tests/system/eddsa/ns2/Xexample.com.+016+38353.key     |     1 -
 external/mpl/bind/dist/bin/tests/system/eddsa/ns2/Xexample.com.+016+38353.private |     3 -
 external/mpl/bind/dist/bin/tests/system/eddsa/ns2/example.com.db                  |    25 -
 external/mpl/bind/dist/bin/tests/system/eddsa/ns2/named.conf                      |    34 -
 external/mpl/bind/dist/bin/tests/system/kasp/ns7/named.conf.in                    |    70 -
 external/mpl/bind/dist/bin/tests/system/kasp/ns7/named2.conf.in                   |    81 -
 external/mpl/bind/dist/bin/tests/system/kasp/ns7/setup.sh                         |    54 -
 external/mpl/bind/dist/bin/tests/system/kasp/ns7/template.ext.db.in               |    22 -
 external/mpl/bind/dist/bin/tests/system/kasp/ns7/template.int.db.in               |    22 -
 external/mpl/bind/dist/bin/tests/wire_test.c                                      |     6 +-
 external/mpl/bind/dist/bin/tools/mdig.c                                           |    40 +-
 external/mpl/bind/dist/bin/tools/named-journalprint.c                             |    55 +-
 external/mpl/bind/dist/bin/tools/named-nzd2nzf.c                                  |     3 +-
 external/mpl/bind/dist/config.h.in                                                |    39 +
 external/mpl/bind/dist/configure                                                  |   228 +-
 external/mpl/bind/dist/lib/bind9/check.c                                          |     6 +-
 external/mpl/bind/dist/lib/dns/db.c                                               |     4 +-
 external/mpl/bind/dist/lib/dns/dbtable.c                                          |    11 +-
 external/mpl/bind/dist/lib/dns/dlz.c                                              |     4 +-
 external/mpl/bind/dist/lib/dns/dnssec.c                                           |     3 +-
 external/mpl/bind/dist/lib/dns/dnstap.c                                           |     8 +-
 external/mpl/bind/dist/lib/dns/dst_api.c                                          |    10 +-
 external/mpl/bind/dist/lib/dns/dst_internal.h                                     |    21 +-
 external/mpl/bind/dist/lib/dns/forward.c                                          |    11 +-
 external/mpl/bind/dist/lib/dns/gssapi_link.c                                      |     8 +-
 external/mpl/bind/dist/lib/dns/gssapictx.c                                        |   270 +-
 external/mpl/bind/dist/lib/dns/include/dns/db.h                                   |    41 +-
 external/mpl/bind/dist/lib/dns/include/dns/dnssec.h                               |     3 +-
 external/mpl/bind/dist/lib/dns/include/dns/dnstap.h                               |     8 +-
 external/mpl/bind/dist/lib/dns/include/dns/events.h                               |     3 +-
 external/mpl/bind/dist/lib/dns/include/dns/journal.h                              |    54 +-
 external/mpl/bind/dist/lib/dns/include/dns/kasp.h                                 |    28 +-
 external/mpl/bind/dist/lib/dns/include/dns/librpz.h                               |     4 +-
 external/mpl/bind/dist/lib/dns/include/dns/lmdb.h                                 |     3 +-
 external/mpl/bind/dist/lib/dns/include/dns/rdataset.h                             |     3 +-
 external/mpl/bind/dist/lib/dns/include/dns/tkey.h                                 |    18 +-
 external/mpl/bind/dist/lib/dns/include/dst/dst.h                                  |     8 +-
 external/mpl/bind/dist/lib/dns/include/dst/gssapi.h                               |    37 +-
 external/mpl/bind/dist/lib/dns/journal.c                                          |   706 ++-
 external/mpl/bind/dist/lib/dns/kasp.c                                             |    19 +-
 external/mpl/bind/dist/lib/dns/keymgr.c                                           |   138 +-
 external/mpl/bind/dist/lib/dns/keytable.c                                         |    15 +-
 external/mpl/bind/dist/lib/dns/nta.c                                              |    10 +-
 external/mpl/bind/dist/lib/dns/openssl_link.c                                     |   130 +-
 external/mpl/bind/dist/lib/dns/rbtdb.c                                            |   158 +-
 external/mpl/bind/dist/lib/dns/rdata/generic/hip_55.c                             |    10 +-
 external/mpl/bind/dist/lib/dns/rdata/generic/loc_29.c                             |     4 +-
 external/mpl/bind/dist/lib/dns/rdata/generic/nsec3_50.c                           |     4 +-
 external/mpl/bind/dist/lib/dns/rdata/generic/nsec3param_51.c                      |     3 +-
 external/mpl/bind/dist/lib/dns/resolver.c                                         |    34 +-
 external/mpl/bind/dist/lib/dns/rpz.c                                              |    14 +-
 external/mpl/bind/dist/lib/dns/spnego.asn1                                        |    50 -
 external/mpl/bind/dist/lib/dns/spnego.c                                           |  1761 -------
 external/mpl/bind/dist/lib/dns/spnego.h                                           |    51 -
 external/mpl/bind/dist/lib/dns/spnego_asn1.c                                      |   987 ----
 external/mpl/bind/dist/lib/dns/spnego_asn1.pl                                     |   191 -
 external/mpl/bind/dist/lib/dns/tests/acl_test.c                                   |     4 +-
 external/mpl/bind/dist/lib/dns/tests/db_test.c                                    |     4 +-
 external/mpl/bind/dist/lib/dns/tests/dbdiff_test.c                                |     4 +-
 external/mpl/bind/dist/lib/dns/tests/dbiterator_test.c                            |     4 +-
 external/mpl/bind/dist/lib/dns/tests/dbversion_test.c                             |     4 +-
 external/mpl/bind/dist/lib/dns/tests/dh_test.c                                    |    10 +-
 external/mpl/bind/dist/lib/dns/tests/dispatch_test.c                              |     4 +-
 external/mpl/bind/dist/lib/dns/tests/dnstap_test.c                                |     9 +-
 external/mpl/bind/dist/lib/dns/tests/dst_test.c                                   |     4 +-
 external/mpl/bind/dist/lib/dns/tests/geoip_test.c                                 |     4 +-
 external/mpl/bind/dist/lib/dns/tests/keytable_test.c                              |     4 +-
 external/mpl/bind/dist/lib/dns/tests/master_test.c                                |     4 +-
 external/mpl/bind/dist/lib/dns/tests/name_test.c                                  |     4 +-
 external/mpl/bind/dist/lib/dns/tests/nsec3_test.c                                 |     4 +-
 external/mpl/bind/dist/lib/dns/tests/nsec3param_test.c                            |     4 +-
 external/mpl/bind/dist/lib/dns/tests/peer_test.c                                  |     4 +-
 external/mpl/bind/dist/lib/dns/tests/private_test.c                               |     4 +-
 external/mpl/bind/dist/lib/dns/tests/rbt_serialize_test.c                         |     4 +-
 external/mpl/bind/dist/lib/dns/tests/rbt_test.c                                   |     4 +-
 external/mpl/bind/dist/lib/dns/tests/rdata_test.c                                 |     5 +-
 external/mpl/bind/dist/lib/dns/tests/rdataset_test.c                              |     4 +-
 external/mpl/bind/dist/lib/dns/tests/rdatasetstats_test.c                         |     4 +-
 external/mpl/bind/dist/lib/dns/tests/resolver_test.c                              |     4 +-
 external/mpl/bind/dist/lib/dns/tests/result_test.c                                |     4 +-
 external/mpl/bind/dist/lib/dns/tests/rsa_test.c                                   |     4 +-
 external/mpl/bind/dist/lib/dns/tests/sigs_test.c                                  |     4 +-
 external/mpl/bind/dist/lib/dns/tests/time_test.c                                  |     4 +-
 external/mpl/bind/dist/lib/dns/tests/tsig_test.c                                  |     4 +-
 external/mpl/bind/dist/lib/dns/tests/update_test.c                                |     4 +-
 external/mpl/bind/dist/lib/dns/tests/zonemgr_test.c                               |     4 +-
 external/mpl/bind/dist/lib/dns/tests/zt_test.c                                    |     4 +-
 external/mpl/bind/dist/lib/dns/tkey.c                                             |    10 +-
 external/mpl/bind/dist/lib/dns/tsig.c                                             |     9 +-
 external/mpl/bind/dist/lib/dns/view.c                                             |     5 +-
 external/mpl/bind/dist/lib/dns/xfrin.c                                            |    16 +-
 external/mpl/bind/dist/lib/dns/zone.c                                             |   327 +-
 external/mpl/bind/dist/lib/dns/zt.c                                               |    11 +-
 external/mpl/bind/dist/lib/irs/tests/resconf_test.c                               |     4 +-
 external/mpl/bind/dist/lib/isc/hp.c                                               |    15 +-
 external/mpl/bind/dist/lib/isc/include/isc/lib.h                                  |    13 +-
 external/mpl/bind/dist/lib/isc/include/isc/mem.h                                  |     5 +-
 external/mpl/bind/dist/lib/isc/include/isc/netmgr.h                               |    46 +-
 external/mpl/bind/dist/lib/isc/include/isc/rwlock.h                               |     4 +-
 external/mpl/bind/dist/lib/isc/include/isc/util.h                                 |    12 +-
 external/mpl/bind/dist/lib/isc/lib.c                                              |    44 +-
 external/mpl/bind/dist/lib/isc/mem.c                                              |   111 +-
 external/mpl/bind/dist/lib/isc/mem_p.h                                            |    18 +-
 external/mpl/bind/dist/lib/isc/netmgr/netmgr-int.h                                |   230 +-
 external/mpl/bind/dist/lib/isc/netmgr/netmgr.c                                    |   500 +-
 external/mpl/bind/dist/lib/isc/netmgr/tcp.c                                       |    64 +-
 external/mpl/bind/dist/lib/isc/netmgr/tcpdns.c                                    |   476 +-
 external/mpl/bind/dist/lib/isc/netmgr/tls.c                                       |   909 ---
 external/mpl/bind/dist/lib/isc/netmgr/tlsdns.c                                    |  2372 +++++++--
 external/mpl/bind/dist/lib/isc/netmgr/udp.c                                       |   199 +-
 external/mpl/bind/dist/lib/isc/openssl_shim.c                                     |   116 +-
 external/mpl/bind/dist/lib/isc/openssl_shim.h                                     |    65 +-
 external/mpl/bind/dist/lib/isc/pthreads/include/isc/thread.h                      |    12 +-
 external/mpl/bind/dist/lib/isc/pthreads/thread.c                                  |    11 +-
 external/mpl/bind/dist/lib/isc/rwlock.c                                           |    11 +-
 external/mpl/bind/dist/lib/isc/task.c                                             |    15 +-
 external/mpl/bind/dist/lib/isc/tests/aes_test.c                                   |     4 +-
 external/mpl/bind/dist/lib/isc/tests/buffer_test.c                                |     4 +-
 external/mpl/bind/dist/lib/isc/tests/counter_test.c                               |     4 +-
 external/mpl/bind/dist/lib/isc/tests/crc64_test.c                                 |     4 +-
 external/mpl/bind/dist/lib/isc/tests/errno_test.c                                 |     4 +-
 external/mpl/bind/dist/lib/isc/tests/file_test.c                                  |     4 +-
 external/mpl/bind/dist/lib/isc/tests/hash_test.c                                  |     4 +-
 external/mpl/bind/dist/lib/isc/tests/heap_test.c                                  |     4 +-
 external/mpl/bind/dist/lib/isc/tests/hmac_test.c                                  |     4 +-
 external/mpl/bind/dist/lib/isc/tests/ht_test.c                                    |     4 +-
 external/mpl/bind/dist/lib/isc/tests/lex_test.c                                   |     4 +-
 external/mpl/bind/dist/lib/isc/tests/md_test.c                                    |     4 +-
 external/mpl/bind/dist/lib/isc/tests/mem_test.c                                   |     6 +-
 external/mpl/bind/dist/lib/isc/tests/netaddr_test.c                               |     4 +-
 external/mpl/bind/dist/lib/isc/tests/parse_test.c                                 |     4 +-
 external/mpl/bind/dist/lib/isc/tests/pool_test.c                                  |     4 +-
 external/mpl/bind/dist/lib/isc/tests/quota_test.c                                 |     4 +-
 external/mpl/bind/dist/lib/isc/tests/radix_test.c                                 |     4 +-
 external/mpl/bind/dist/lib/isc/tests/random_test.c                                |     4 +-
 external/mpl/bind/dist/lib/isc/tests/regex_test.c                                 |     4 +-
 external/mpl/bind/dist/lib/isc/tests/result_test.c                                |     4 +-
 external/mpl/bind/dist/lib/isc/tests/safe_test.c                                  |     4 +-
 external/mpl/bind/dist/lib/isc/tests/siphash_test.c                               |     4 +-
 external/mpl/bind/dist/lib/isc/tests/sockaddr_test.c                              |     4 +-
 external/mpl/bind/dist/lib/isc/tests/socket_test.c                                |     4 +-
 external/mpl/bind/dist/lib/isc/tests/symtab_test.c                                |     4 +-
 external/mpl/bind/dist/lib/isc/tests/task_test.c                                  |     4 +-
 external/mpl/bind/dist/lib/isc/tests/taskpool_test.c                              |     4 +-
 external/mpl/bind/dist/lib/isc/tests/tcp_quota_test.c                             |     8 +-
 external/mpl/bind/dist/lib/isc/tests/tcp_test.c                                   |     8 +-
 external/mpl/bind/dist/lib/isc/tests/tcpdns_test.c                                |     9 +-
 external/mpl/bind/dist/lib/isc/tests/time_test.c                                  |     8 +-
 external/mpl/bind/dist/lib/isc/tests/timer_test.c                                 |     4 +-
 external/mpl/bind/dist/lib/isc/tests/udp_test.c                                   |     8 +-
 external/mpl/bind/dist/lib/isc/unix/include/isc/time.h                            |    22 +-
 external/mpl/bind/dist/lib/isc/unix/time.c                                        |    26 +-
 external/mpl/bind/dist/lib/isc/win32/DLLMain.c                                    |    30 +-
 external/mpl/bind/dist/lib/isc/win32/condition.c                                  |     4 +-
 external/mpl/bind/dist/lib/isc/win32/include/isc/condition.h                      |     6 +-
 external/mpl/bind/dist/lib/isc/win32/include/isc/thread.h                         |     7 +-
 external/mpl/bind/dist/lib/isc/win32/include/isc/time.h                           |    22 +-
 external/mpl/bind/dist/lib/isc/win32/thread.c                                     |    12 +-
 external/mpl/bind/dist/lib/isc/win32/time.c                                       |    11 +-
 external/mpl/bind/dist/lib/isccc/tests/result_test.c                              |     4 +-
 external/mpl/bind/dist/lib/isccfg/kaspconf.c                                      |     4 +-
 external/mpl/bind/dist/lib/isccfg/namedconf.c                                     |     3 +-
 external/mpl/bind/dist/lib/isccfg/tests/duration_test.c                           |     4 +-
 external/mpl/bind/dist/lib/isccfg/tests/parser_test.c                             |     4 +-
 external/mpl/bind/dist/lib/ns/Makefile.in                                         |     2 -
 external/mpl/bind/dist/lib/ns/client.c                                            |     5 +-
 external/mpl/bind/dist/lib/ns/include/ns/client.h                                 |     3 +-
 external/mpl/bind/dist/lib/ns/interfacemgr.c                                      |     3 +-
 external/mpl/bind/dist/lib/ns/query.c                                             |   457 +-
 external/mpl/bind/dist/lib/ns/tests/listenlist_test.c                             |    21 +-
 external/mpl/bind/dist/lib/ns/tests/notify_test.c                                 |    21 +-
 external/mpl/bind/dist/lib/ns/tests/nstest.h                                      |    11 +-
 external/mpl/bind/dist/lib/ns/tests/plugin_test.c                                 |     4 +-
 external/mpl/bind/dist/lib/ns/tests/query_test.c                                  |    21 +-
 external/mpl/bind/include/config.h                                                |    56 +-
 external/mpl/bind/include/isc/stdatomic.h                                         |     2 +-
 external/mpl/bind/lib/libbind9/shlib_version                                      |     4 +-
 external/mpl/bind/lib/libdns/Makefile                                             |     4 +-
 external/mpl/bind/lib/libdns/shlib_version                                        |     4 +-
 external/mpl/bind/lib/libirs/shlib_version                                        |     4 +-
 external/mpl/bind/lib/libisc/Makefile                                             |     5 +-
 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 +-
 200 files changed, 5205 insertions(+), 7421 deletions(-)

diffs (truncated from 18841 to 300 lines):

diff -r 3d7625a05f5e -r 338bf2ea99fd external/mpl/bind/dist/bin/dig/dighost.c
--- a/external/mpl/bind/dist/bin/dig/dighost.c  Thu Apr 29 17:11:30 2021 +0000
+++ b/external/mpl/bind/dist/bin/dig/dighost.c  Thu Apr 29 17:26:09 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dighost.c,v 1.10 2021/02/19 16:42:09 christos Exp $    */
+/*     $NetBSD: dighost.c,v 1.11 2021/04/29 17:26:09 christos Exp $    */
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -2937,7 +2937,11 @@
        }
        isc_buffer_usedregion(&query->sendbuf, &r);
        debug("sending a request");
-       TIME_NOW(&query->time_sent);
+       if (query->lookup->use_usec) {
+               TIME_NOW_HIRES(&query->time_sent);
+       } else {
+               TIME_NOW(&query->time_sent);
+       }
        INSIST(query->sock != NULL);
        query->waiting_senddone = true;
        sevent = isc_socket_socketevent(
@@ -3077,7 +3081,8 @@
  */
 static void
 requeue_or_update_exitcode(dig_lookup_t *lookup) {
-       if (lookup->eoferr == 0U) {
+       if (lookup->eoferr == 0U && lookup->retries > 1) {
+               --lookup->retries;
                /*
                 * Peer closed the connection prematurely for the first time
                 * for this lookup.  Try again, keeping track of this failure.
@@ -3219,7 +3224,11 @@
        debug("recvcount=%d", recvcount);
        if (!query->first_soa_rcvd) {
                debug("sending a request in launch_next_query");
-               TIME_NOW(&query->time_sent);
+               if (query->lookup->use_usec) {
+                       TIME_NOW_HIRES(&query->time_sent);
+               } else {
+                       TIME_NOW(&query->time_sent);
+               }
                query->waiting_senddone = true;
                isc_buffer_clear(&query->tmpsendbuf);
                isc_buffer_putuint16(&query->tmpsendbuf,
@@ -3625,7 +3634,11 @@
        INSIST(recvcount >= 0);
 
        query = event->ev_arg;
-       TIME_NOW(&query->time_recv);
+       if (query->lookup->use_usec) {
+               TIME_NOW_HIRES(&query->time_recv);
+       } else {
+               TIME_NOW(&query->time_recv);
+       }
 
        l = query->lookup;
 
diff -r 3d7625a05f5e -r 338bf2ea99fd external/mpl/bind/dist/bin/dig/host.c
--- a/external/mpl/bind/dist/bin/dig/host.c     Thu Apr 29 17:11:30 2021 +0000
+++ b/external/mpl/bind/dist/bin/dig/host.c     Thu Apr 29 17:26:09 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: host.c,v 1.6 2021/02/19 16:42:09 christos Exp $        */
+/*     $NetBSD: host.c,v 1.7 2021/04/29 17:26:09 christos Exp $        */
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -150,7 +150,11 @@
        if (!short_form) {
                char fromtext[ISC_SOCKADDR_FORMATSIZE];
                isc_sockaddr_format(from, fromtext, sizeof(fromtext));
-               TIME_NOW(&now);
+               if (query->lookup->use_usec) {
+                       TIME_NOW_HIRES(&now);
+               } else {
+                       TIME_NOW(&now);
+               }
                diff = (int)isc_time_microdiff(&now, &query->time_sent);
                printf("Received %u bytes from %s in %d ms\n", bytes, fromtext,
                       diff / 1000);
diff -r 3d7625a05f5e -r 338bf2ea99fd external/mpl/bind/dist/bin/dnssec/dnssec-signzone.c
--- a/external/mpl/bind/dist/bin/dnssec/dnssec-signzone.c       Thu Apr 29 17:11:30 2021 +0000
+++ b/external/mpl/bind/dist/bin/dnssec/dnssec-signzone.c       Thu Apr 29 17:26:09 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dnssec-signzone.c,v 1.6 2021/02/19 16:42:10 christos Exp $     */
+/*     $NetBSD: dnssec-signzone.c,v 1.7 2021/04/29 17:26:09 christos Exp $     */
 
 /*
  * Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -3807,11 +3807,7 @@
         * of keys rather early.
         */
        ISC_LIST_INIT(keylist);
-       result = isc_rwlock_init(&keylist_lock, 0, 0);
-       if (result != ISC_R_SUCCESS) {
-               fatal("could not initialize keylist_lock: %s",
-                     isc_result_totext(result));
-       }
+       isc_rwlock_init(&keylist_lock, 0, 0);
 
        /*
         * Fill keylist with:
diff -r 3d7625a05f5e -r 338bf2ea99fd external/mpl/bind/dist/bin/named/config.c
--- a/external/mpl/bind/dist/bin/named/config.c Thu Apr 29 17:11:30 2021 +0000
+++ b/external/mpl/bind/dist/bin/named/config.c Thu Apr 29 17:26:09 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: config.c,v 1.10 2021/02/19 16:42:10 christos Exp $     */
+/*     $NetBSD: config.c,v 1.11 2021/04/29 17:26:09 christos Exp $     */
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -197,7 +197,7 @@
        servfail-ttl 1;\n\
 #      sortlist <none>\n\
        stale-answer-enable false;\n\
-       stale-answer-client-timeout 1800; /* in milliseconds */\n\
+       stale-answer-client-timeout off;\n\
        stale-answer-ttl 30; /* 30 seconds */\n\
        stale-cache-enable true;\n\
        stale-refresh-time 30; /* 30 seconds */\n\
diff -r 3d7625a05f5e -r 338bf2ea99fd external/mpl/bind/dist/bin/named/main.c
--- a/external/mpl/bind/dist/bin/named/main.c   Thu Apr 29 17:11:30 2021 +0000
+++ b/external/mpl/bind/dist/bin/named/main.c   Thu Apr 29 17:26:09 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.10 2021/02/19 16:42:10 christos Exp $       */
+/*     $NetBSD: main.c,v 1.11 2021/04/29 17:26:09 christos Exp $       */
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -20,6 +20,10 @@
 #include <string.h>
 #include <uv.h>
 
+#ifdef HAVE_DNSTAP
+#include <protobuf-c/protobuf-c.h>
+#endif
+
 #include <isc/app.h>
 #include <isc/backtrace.h>
 #include <isc/commandline.h>
diff -r 3d7625a05f5e -r 338bf2ea99fd external/mpl/bind/dist/bin/named/server.c
--- a/external/mpl/bind/dist/bin/named/server.c Thu Apr 29 17:11:30 2021 +0000
+++ b/external/mpl/bind/dist/bin/named/server.c Thu Apr 29 17:26:09 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: server.c,v 1.15 2021/04/05 11:36:55 rillig Exp $       */
+/*     $NetBSD: server.c,v 1.16 2021/04/29 17:26:09 christos Exp $     */
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -22,6 +22,10 @@
 #include <sys/types.h>
 #include <unistd.h>
 
+#ifdef HAVE_DNSTAP
+#include <fstrm.h>
+#endif
+
 #include <isc/aes.h>
 #include <isc/app.h>
 #include <isc/base64.h>
@@ -134,6 +138,8 @@
 #endif /* ifdef HAVE_LIBSCF */
 
 #ifdef HAVE_LMDB
+#include <lmdb.h>
+
 #include <dns/lmdb.h>
 #define count_newzones    count_newzones_db
 #define configure_newzones configure_newzones_db
@@ -162,7 +168,18 @@
 #define EXCLBUFFERS           4096
 #endif /* TUNE_LARGE */
 
-#define MAX_TCP_TIMEOUT 65535
+/* RFC7828 defines timeout as 16-bit value specified in units of 100
+ * milliseconds, so the maximum and minimum advertised and keepalive
+ * timeouts are capped by the data type (it's ~109 minutes)
+ */
+#define MIN_INITIAL_TIMEOUT    UINT32_C(2500)  /* 2.5 seconds */
+#define MAX_INITIAL_TIMEOUT    UINT32_C(120000) /* 2 minutes */
+#define MIN_IDLE_TIMEOUT       UINT32_C(100)   /* 0.1 seconds */
+#define MAX_IDLE_TIMEOUT       UINT32_C(120000) /* 2 minutes */
+#define MIN_KEEPALIVE_TIMEOUT  UINT32_C(100)   /* 0.1 seconds */
+#define MAX_KEEPALIVE_TIMEOUT  UINT32_C(UINT16_MAX * 100)
+#define MIN_ADVERTISED_TIMEOUT UINT32_C(0) /* No minimum */
+#define MAX_ADVERTISED_TIMEOUT UINT32_C(UINT16_MAX * 100)
 
 /*%
  * Check an operation for failure.  Assumes that the function
@@ -7793,7 +7810,6 @@
        isc_result_t result2;
        dns_view_t *pview = NULL;
        dns_zone_t *zone = NULL;
-       dns_zone_t *raw = NULL;
 
        zname = cfg_obj_asstring(cfg_tuple_get(zconfig, "name"));
        origin = dns_fixedname_initname(&fixorigin);
@@ -7815,22 +7831,10 @@
                return;
        }
 
-       dns_zone_getraw(zone, &raw);
-
        if (result == ISC_R_SUCCESS) {
                dns_zone_setviewcommit(zone);
-               if (raw != NULL) {
-                       dns_zone_setviewcommit(raw);
-               }
        } else {
                dns_zone_setviewrevert(zone);
-               if (raw != NULL) {
-                       dns_zone_setviewrevert(raw);
-               }
-       }
-
-       if (raw != NULL) {
-               dns_zone_detach(&raw);
        }
 
        dns_zone_detach(&zone);
@@ -8326,7 +8330,7 @@
        unsigned int maxsocks;
        uint32_t softquota = 0;
        uint32_t max;
-       unsigned int initial, idle, keepalive, advertised;
+       uint64_t initial, idle, keepalive, advertised;
        dns_aclenv_t *env =
                ns_interfacemgr_getaclenv(named_g_server->interfacemgr);
 
@@ -8583,62 +8587,67 @@
        obj = NULL;
        result = named_config_get(maps, "tcp-initial-timeout", &obj);
        INSIST(result == ISC_R_SUCCESS);
-       initial = cfg_obj_asuint32(obj);
-       if (initial > 1200) {
+       initial = cfg_obj_asuint32(obj) * 100;
+       if (initial > MAX_INITIAL_TIMEOUT) {
                cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
                            "tcp-initial-timeout value is out of range: "
-                           "lowering to 1200");
-               initial = 1200;
-       } else if (initial < 25) {
+                           "lowering to %" PRIu32,
+                           MAX_INITIAL_TIMEOUT / 100);
+               initial = MAX_INITIAL_TIMEOUT;
+       } else if (initial < MIN_INITIAL_TIMEOUT) {
                cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
                            "tcp-initial-timeout value is out of range: "
-                           "raising to 25");
-               initial = 25;
+                           "raising to %" PRIu32,
+                           MIN_INITIAL_TIMEOUT / 100);
+               initial = MIN_INITIAL_TIMEOUT;
        }
 
        obj = NULL;
        result = named_config_get(maps, "tcp-idle-timeout", &obj);
        INSIST(result == ISC_R_SUCCESS);
-       idle = cfg_obj_asuint32(obj);
-       if (idle > 1200) {
+       idle = cfg_obj_asuint32(obj) * 100;
+       if (idle > MAX_IDLE_TIMEOUT) {
                cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
                            "tcp-idle-timeout value is out of range: "
-                           "lowering to 1200");
-               idle = 1200;
-       } else if (idle < 1) {
+                           "lowering to %" PRIu32,
+                           MAX_IDLE_TIMEOUT / 100);
+               idle = MAX_IDLE_TIMEOUT;
+       } else if (idle < MIN_IDLE_TIMEOUT) {
                cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
                            "tcp-idle-timeout value is out of range: "
-                           "raising to 1");
-               idle = 1;
+                           "raising to %" PRIu32,
+                           MIN_IDLE_TIMEOUT / 100);
+               idle = MIN_IDLE_TIMEOUT;
        }
 
        obj = NULL;
        result = named_config_get(maps, "tcp-keepalive-timeout", &obj);
        INSIST(result == ISC_R_SUCCESS);
-       keepalive = cfg_obj_asuint32(obj);
-       if (keepalive > MAX_TCP_TIMEOUT) {
+       keepalive = cfg_obj_asuint32(obj) * 100;
+       if (keepalive > MAX_KEEPALIVE_TIMEOUT) {
                cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
                            "tcp-keepalive-timeout value is out of range: "
-                           "lowering to %u",
-                           MAX_TCP_TIMEOUT);
-               keepalive = MAX_TCP_TIMEOUT;
-       } else if (keepalive < 1) {
+                           "lowering to %" PRIu32,
+                           MAX_KEEPALIVE_TIMEOUT / 100);
+               keepalive = MAX_KEEPALIVE_TIMEOUT;
+       } else if (keepalive < MIN_KEEPALIVE_TIMEOUT) {
                cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
                            "tcp-keepalive-timeout value is out of range: "
-                           "raising to 1");



Home | Main Index | Thread Index | Old Index