Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package pdns for openSUSE:Factory checked in at 2022-04-12 21:51:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pdns (Old) and /work/SRC/openSUSE:Factory/.pdns.new.1900 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pdns" Tue Apr 12 21:51:08 2022 rev:81 rq:969512 version:4.6.2 Changes: -------- --- /work/SRC/openSUSE:Factory/pdns/pdns.changes 2022-03-28 17:02:12.209103239 +0200 +++ /work/SRC/openSUSE:Factory/.pdns.new.1900/pdns.changes 2022-04-12 21:52:00.489827464 +0200 @@ -1,0 +2,20 @@ +Tue Apr 12 13:01:19 UTC 2022 - Michael Str??der <[email protected]> + +- Update to 4.6.2 + * New Features + - API: fetch individual rrsets + References: pull request 11409 + - LUA: add ifurlextup function + References: pull request 11408 + * Improvements + - LMDB backports: + + each LMDB database now gets a UUID + + lmdbbackend can now (optionally: lmdb-random-ids) use random IDs instead of incremental IDs for objects + + LMDB map size is now configurable (lmdb-map-size) + + one uninitialised memory issue that was fixed + References: pull request 11406 + * Bug Fixes + - fix proxy protocol query statistics and add more detailed latency metrics + References: pull request 11407 + +------------------------------------------------------------------- Old: ---- pdns-4.6.1.tar.bz2 pdns-4.6.1.tar.bz2.sig New: ---- pdns-4.6.2.tar.bz2 pdns-4.6.2.tar.bz2.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pdns.spec ++++++ --- /var/tmp/diff_new_pack.ITX5lF/_old 2022-04-12 21:52:01.093820680 +0200 +++ /var/tmp/diff_new_pack.ITX5lF/_new 2022-04-12 21:52:01.097820636 +0200 @@ -57,7 +57,7 @@ %endif Name: pdns -Version: 4.6.1 +Version: 4.6.2 Release: 0 Summary: Authoritative-only nameserver License: GPL-2.0-only ++++++ pdns-4.6.1.tar.bz2 -> pdns-4.6.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/configure new/pdns-4.6.2/configure --- old/pdns-4.6.1/configure 2022-03-21 09:47:45.000000000 +0100 +++ new/pdns-4.6.2/configure 2022-04-12 09:02:27.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for pdns 4.6.1. +# Generated by GNU Autoconf 2.69 for pdns 4.6.2. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='pdns' PACKAGE_TARNAME='pdns' -PACKAGE_VERSION='4.6.1' -PACKAGE_STRING='pdns 4.6.1' +PACKAGE_VERSION='4.6.2' +PACKAGE_STRING='pdns 4.6.2' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1647,7 +1647,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures pdns 4.6.1 to adapt to many kinds of systems. +\`configure' configures pdns 4.6.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1718,7 +1718,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of pdns 4.6.1:";; + short | recursive ) echo "Configuration of pdns 4.6.2:";; esac cat <<\_ACEOF @@ -1970,7 +1970,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -pdns configure 4.6.1 +pdns configure 4.6.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2687,7 +2687,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by pdns $as_me 4.6.1, which was +It was created by pdns $as_me 4.6.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3557,7 +3557,7 @@ # Define the identity of the package. PACKAGE='pdns' - VERSION='4.6.1' + VERSION='4.6.2' cat >>confdefs.h <<_ACEOF @@ -29342,7 +29342,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by pdns $as_me 4.6.1, which was +This file was extended by pdns $as_me 4.6.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -29408,7 +29408,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -pdns config.status 4.6.1 +pdns config.status 4.6.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/configure.ac new/pdns-4.6.2/configure.ac --- old/pdns-4.6.1/configure.ac 2022-03-21 09:47:35.000000000 +0100 +++ new/pdns-4.6.2/configure.ac 2022-04-12 09:02:12.000000000 +0200 @@ -1,6 +1,6 @@ AC_PREREQ([2.69]) -AC_INIT([pdns], [4.6.1]) +AC_INIT([pdns], [4.6.2]) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip tar-ustar -Wno-portability subdir-objects parallel-tests 1.11]) AM_SILENT_RULES([yes]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/calidns.1 new/pdns-4.6.2/docs/calidns.1 --- old/pdns-4.6.1/docs/calidns.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/calidns.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "CALIDNS" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "CALIDNS" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME calidns \- A DNS recursor testing tool .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/dnsbulktest.1 new/pdns-4.6.2/docs/dnsbulktest.1 --- old/pdns-4.6.1/docs/dnsbulktest.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/dnsbulktest.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "DNSBULKTEST" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "DNSBULKTEST" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME dnsbulktest \- A debugging tool for intermittent resolver failures .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/dnsgram.1 new/pdns-4.6.2/docs/dnsgram.1 --- old/pdns-4.6.1/docs/dnsgram.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/dnsgram.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "DNSGRAM" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "DNSGRAM" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME dnsgram \- A debugging tool for intermittent resolver failures .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/dnspcap2calidns.1 new/pdns-4.6.2/docs/dnspcap2calidns.1 --- old/pdns-4.6.1/docs/dnspcap2calidns.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/dnspcap2calidns.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "DNSPCAP2CALIDNS" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "DNSPCAP2CALIDNS" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME dnspcap2calidns \- A tool to convert PCAPs of DNS traffic to calidns input .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/dnspcap2protobuf.1 new/pdns-4.6.2/docs/dnspcap2protobuf.1 --- old/pdns-4.6.1/docs/dnspcap2protobuf.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/dnspcap2protobuf.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "DNSPCAP2PROTOBUF" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "DNSPCAP2PROTOBUF" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME dnspcap2protobuf \- A tool to convert PCAPs of DNS traffic to PowerDNS Protobuf .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/dnsreplay.1 new/pdns-4.6.2/docs/dnsreplay.1 --- old/pdns-4.6.1/docs/dnsreplay.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/dnsreplay.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "DNSREPLAY" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "DNSREPLAY" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME dnsreplay \- A PowerDNS nameserver debugging tool .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/dnsscan.1 new/pdns-4.6.2/docs/dnsscan.1 --- old/pdns-4.6.1/docs/dnsscan.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/dnsscan.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "DNSSCAN" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "DNSSCAN" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME dnsscan \- List the amount of queries per qtype in a pcap .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/dnsscope.1 new/pdns-4.6.2/docs/dnsscope.1 --- old/pdns-4.6.1/docs/dnsscope.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/dnsscope.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "DNSSCOPE" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "DNSSCOPE" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME dnsscope \- A PowerDNS nameserver debugging tool .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/dnstcpbench.1 new/pdns-4.6.2/docs/dnstcpbench.1 --- old/pdns-4.6.1/docs/dnstcpbench.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/dnstcpbench.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "DNSTCPBENCH" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "DNSTCPBENCH" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME dnstcpbench \- tool to perform TCP benchmarking of nameservers .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/dnswasher.1 new/pdns-4.6.2/docs/dnswasher.1 --- old/pdns-4.6.1/docs/dnswasher.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/dnswasher.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "DNSWASHER" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "DNSWASHER" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME dnswasher \- A PowerDNS nameserver debugging tool .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/dumresp.1 new/pdns-4.6.2/docs/dumresp.1 --- old/pdns-4.6.1/docs/dumresp.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/dumresp.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "DUMRESP" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "DUMRESP" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME dumresp \- A dumb DNS responder .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/ixfrdist.1 new/pdns-4.6.2/docs/ixfrdist.1 --- old/pdns-4.6.1/docs/ixfrdist.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/ixfrdist.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "IXFRDIST" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "IXFRDIST" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME ixfrdist \- An IXFR/AXFR-only server that re-distributes zones .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/ixfrdist.yml.5 new/pdns-4.6.2/docs/ixfrdist.yml.5 --- old/pdns-4.6.1/docs/ixfrdist.yml.5 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/ixfrdist.yml.5 2022-04-12 09:05:30.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "IXFRDIST.YML" "5" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "IXFRDIST.YML" "5" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME ixfrdist.yml \- The ixfrdist configuration file .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/ixplore.1 new/pdns-4.6.2/docs/ixplore.1 --- old/pdns-4.6.1/docs/ixplore.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/ixplore.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "IXPLORE" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "IXPLORE" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME ixplore \- A tool that provides insights into IXFRs .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/nproxy.1 new/pdns-4.6.2/docs/nproxy.1 --- old/pdns-4.6.1/docs/nproxy.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/nproxy.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "NPROXY" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "NPROXY" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME nproxy \- DNS notification proxy .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/nsec3dig.1 new/pdns-4.6.2/docs/nsec3dig.1 --- old/pdns-4.6.1/docs/nsec3dig.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/nsec3dig.1 2022-04-12 09:05:30.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "NSEC3DIG" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "NSEC3DIG" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME nsec3dig \- Show and validate NSEC3 proofs .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/pdns_control.1 new/pdns-4.6.2/docs/pdns_control.1 --- old/pdns-4.6.1/docs/pdns_control.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/pdns_control.1 2022-04-12 09:05:30.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "PDNS_CONTROL" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "PDNS_CONTROL" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME pdns_control \- Control the PowerDNS nameserver .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/pdns_notify.1 new/pdns-4.6.2/docs/pdns_notify.1 --- old/pdns-4.6.1/docs/pdns_notify.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/pdns_notify.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "PDNS_NOTIFY" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "PDNS_NOTIFY" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME pdns_notify \- A simple DNS NOTIFY sender .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/pdns_server.1 new/pdns-4.6.2/docs/pdns_server.1 --- old/pdns-4.6.1/docs/pdns_server.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/pdns_server.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "PDNS_SERVER" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "PDNS_SERVER" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME pdns_server \- The PowerDNS Authoritative Nameserver .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/pdnsutil.1 new/pdns-4.6.2/docs/pdnsutil.1 --- old/pdns-4.6.1/docs/pdnsutil.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/pdnsutil.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "PDNSUTIL" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "PDNSUTIL" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME pdnsutil \- PowerDNS record and DNSSEC command and control .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/saxfr.1 new/pdns-4.6.2/docs/saxfr.1 --- old/pdns-4.6.1/docs/saxfr.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/saxfr.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "SAXFR" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "SAXFR" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME saxfr \- Perform AXFRs and show information about it .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/sdig.1 new/pdns-4.6.2/docs/sdig.1 --- old/pdns-4.6.1/docs/sdig.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/sdig.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "SDIG" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "SDIG" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME sdig \- Perform a DNS query and show the results .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/zone2json.1 new/pdns-4.6.2/docs/zone2json.1 --- old/pdns-4.6.1/docs/zone2json.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/zone2json.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "ZONE2JSON" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "ZONE2JSON" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME zone2json \- convert BIND zones to JSON .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/zone2ldap.1 new/pdns-4.6.2/docs/zone2ldap.1 --- old/pdns-4.6.1/docs/zone2ldap.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/zone2ldap.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "ZONE2LDAP" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "ZONE2LDAP" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME zone2ldap \- convert zonefiles to ldif .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/docs/zone2sql.1 new/pdns-4.6.2/docs/zone2sql.1 --- old/pdns-4.6.1/docs/zone2sql.1 2022-03-21 09:49:19.000000000 +0100 +++ new/pdns-4.6.2/docs/zone2sql.1 2022-04-12 09:05:29.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "ZONE2SQL" "1" "Mar 21, 2022" "" "PowerDNS Authoritative Server" +.TH "ZONE2SQL" "1" "Apr 12, 2022" "" "PowerDNS Authoritative Server" .SH NAME zone2sql \- convert BIND zones to SQL .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/ext/lmdb-safe/lmdb-safe.cc new/pdns-4.6.2/ext/lmdb-safe/lmdb-safe.cc --- old/pdns-4.6.1/ext/lmdb-safe/lmdb-safe.cc 2022-03-21 09:46:56.000000000 +0100 +++ new/pdns-4.6.2/ext/lmdb-safe/lmdb-safe.cc 2022-04-12 09:01:20.000000000 +0200 @@ -27,11 +27,9 @@ // Database names are keys in the unnamed database, and may be read but not written. } -MDBEnv::MDBEnv(const char* fname, int flags, int mode) +MDBEnv::MDBEnv(const char* fname, int flags, int mode, uint64_t mapsizeMB) { mdb_env_create(&d_env); - uint64_t mapsizeMB = (sizeof(long)==4) ? 100 : 16000; - // on 32 bit platforms, there is just no room for more if(mdb_env_set_mapsize(d_env, mapsizeMB * 1048576)) throw std::runtime_error("setting map size"); /* @@ -90,7 +88,7 @@ } -std::shared_ptr<MDBEnv> getMDBEnv(const char* fname, int flags, int mode) +std::shared_ptr<MDBEnv> getMDBEnv(const char* fname, int flags, int mode, uint64_t mapsizeMB) { struct Value { @@ -107,7 +105,7 @@ throw std::runtime_error("Unable to stat prospective mdb database: "+string(strerror(errno))); else { std::lock_guard<std::mutex> l(mut); - auto fresh = std::make_shared<MDBEnv>(fname, flags, mode); + auto fresh = std::make_shared<MDBEnv>(fname, flags, mode, mapsizeMB); if(stat(fname, &statbuf)) throw std::runtime_error("Unable to stat prospective mdb database: "+string(strerror(errno))); auto key = std::tie(statbuf.st_dev, statbuf.st_ino); @@ -132,7 +130,7 @@ } } - auto fresh = std::make_shared<MDBEnv>(fname, flags, mode); + auto fresh = std::make_shared<MDBEnv>(fname, flags, mode, mapsizeMB); s_envs[key] = {fresh, flags}; return fresh; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/ext/lmdb-safe/lmdb-safe.hh new/pdns-4.6.2/ext/lmdb-safe/lmdb-safe.hh --- old/pdns-4.6.1/ext/lmdb-safe/lmdb-safe.hh 2022-03-21 09:46:56.000000000 +0100 +++ new/pdns-4.6.2/ext/lmdb-safe/lmdb-safe.hh 2022-04-04 19:51:40.000000000 +0200 @@ -54,7 +54,7 @@ class MDBEnv { public: - MDBEnv(const char* fname, int flags, int mode); + MDBEnv(const char* fname, int flags, int mode, uint64_t mapsizeMB); ~MDBEnv() { @@ -87,7 +87,7 @@ std::map<std::thread::id, int> d_ROtransactionsOut; }; -std::shared_ptr<MDBEnv> getMDBEnv(const char* fname, int flags, int mode); +std::shared_ptr<MDBEnv> getMDBEnv(const char* fname, int flags, int mode, uint64_t mapsizeMB=(sizeof(void *)==4) ? 100 : 16000); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/ext/lmdb-safe/lmdb-typed.cc new/pdns-4.6.2/ext/lmdb-safe/lmdb-typed.cc --- old/pdns-4.6.1/ext/lmdb-safe/lmdb-typed.cc 2022-03-21 09:46:56.000000000 +0100 +++ new/pdns-4.6.2/ext/lmdb-safe/lmdb-typed.cc 2022-04-04 19:51:40.000000000 +0200 @@ -1,4 +1,5 @@ #include "lmdb-typed.hh" +#include "pdns/dns_random.hh" unsigned int MDBGetMaxID(MDBRWTransaction& txn, MDBDbi& dbi) { @@ -11,4 +12,21 @@ return maxid; } +unsigned int MDBGetRandomID(MDBRWTransaction& txn, MDBDbi& dbi) +{ + auto cursor = txn->getRWCursor(dbi); + unsigned int id; + for(int attempts=0; attempts<20; attempts++) { + MDBOutVal key, content; + + // dns_random generates a random number in [0..signed_int_max-1]. We add 1 to avoid 0 and allow type_max. + // 0 is avoided because the put() interface uses it to mean "please allocate a number for me" + id = dns_random(std::numeric_limits<signed int>::max()) + 1; + if(cursor.find(MDBInVal(id), key, content)) { + return id; + } + } + throw std::runtime_error("MDBGetRandomID() could not assign an unused random ID"); +} + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/ext/lmdb-safe/lmdb-typed.hh new/pdns-4.6.2/ext/lmdb-safe/lmdb-typed.hh --- old/pdns-4.6.1/ext/lmdb-safe/lmdb-typed.hh 2022-03-21 09:46:56.000000000 +0100 +++ new/pdns-4.6.2/ext/lmdb-safe/lmdb-typed.hh 2022-04-04 19:51:40.000000000 +0200 @@ -35,6 +35,12 @@ */ unsigned int MDBGetMaxID(MDBRWTransaction& txn, MDBDbi& dbi); +/** Return a randomly generated ID that is unique and not zero. + May throw if the database is very full. +*/ +unsigned int MDBGetRandomID(MDBRWTransaction& txn, MDBDbi& dbi); + + /** This is our serialization interface. You can define your own serToString for your type if you know better */ @@ -588,12 +594,17 @@ } // insert something, with possibly a specific id - uint32_t put(const T& t, uint32_t id=0) + uint32_t put(const T& t, uint32_t id, bool random_ids=false) { int flags = 0; if(!id) { - id = MDBGetMaxID(*d_txn, d_parent->d_main) + 1; - flags = MDB_APPEND; + if(random_ids) { + id = MDBGetRandomID(*d_txn, d_parent->d_main); + } + else { + id = MDBGetMaxID(*d_txn, d_parent->d_main) + 1; + flags = MDB_APPEND; + } } (*d_txn)->put(d_parent->d_main, id, serToString(t), flags); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/modules/lmdbbackend/lmdbbackend.cc new/pdns-4.6.2/modules/lmdbbackend/lmdbbackend.cc --- old/pdns-4.6.1/modules/lmdbbackend/lmdbbackend.cc 2022-03-21 09:46:56.000000000 +0100 +++ new/pdns-4.6.2/modules/lmdbbackend/lmdbbackend.cc 2022-04-04 19:51:40.000000000 +0200 @@ -34,11 +34,13 @@ #include "pdns/version.hh" #include "pdns/arguments.hh" #include "pdns/lock.hh" +#include "pdns/uuid-utils.hh" #include <boost/archive/binary_oarchive.hpp> #include <boost/archive/binary_iarchive.hpp> #include <boost/serialization/vector.hpp> #include <boost/serialization/string.hpp> #include <boost/serialization/utility.hpp> +#include <boost/uuid/uuid_serialize.hpp> #include <boost/iostreams/device/back_inserter.hpp> @@ -67,6 +69,8 @@ string syncMode = toLower(getArg("sync-mode")); + d_random_ids = mustDo("random-ids"); + if (syncMode == "nosync") d_asyncFlag = MDB_NOSYNC; else if (syncMode == "nometasync") @@ -78,7 +82,14 @@ else throw std::runtime_error("Unknown sync mode " + syncMode + " requested for LMDB backend"); - d_tdomains = std::make_shared<tdomains_t>(getMDBEnv(getArg("filename").c_str(), MDB_NOSUBDIR | d_asyncFlag, 0600), "domains"); + uint64_t mapSize = 0; + try { + mapSize = std::stoll(getArg("map-size")); + } + catch (const std::exception& e) { + throw std::runtime_error(std::string("Unable to parse the 'map-size' LMDB value: ") + e.what()); + } + d_tdomains = std::make_shared<tdomains_t>(getMDBEnv(getArg("filename").c_str(), MDB_NOSUBDIR | d_asyncFlag, 0600, mapSize), "domains"); d_tmeta = std::make_shared<tmeta_t>(d_tdomains->getEnv(), "metadata"); d_tkdb = std::make_shared<tkdb_t>(d_tdomains->getEnv(), "keydata"); d_ttsig = std::make_shared<ttsig_t>(d_tdomains->getEnv(), "tsig"); @@ -115,6 +126,13 @@ txn->put(pdnsdbi, "shards", s_shards); } + MDBOutVal gotuuid; + if (txn->get(pdnsdbi, "uuid", gotuuid)) { + const auto uuid = getUniqueID(); + const string uuids(uuid.begin(), uuid.end()); + txn->put(pdnsdbi, "uuid", uuids); + } + txn->commit(); if (schemaversion < 3) { @@ -969,7 +987,7 @@ di.masters = masters; di.account = account; - txn.put(di); + txn.put(di, 0, d_random_ids); txn.commit(); } @@ -1060,7 +1078,7 @@ for (const auto& m : meta) { DomainMeta dm{name, kind, m}; - txn.put(dm); + txn.put(dm, 0, d_random_ids); } txn.commit(); return true; @@ -1097,7 +1115,7 @@ { auto txn = d_tkdb->getRWTransaction(); KeyDataDB kdb{name, key.content, key.flags, key.active, key.published}; - id = txn.put(kdb); + id = txn.put(kdb, 0, d_random_ids); txn.commit(); return true; @@ -1703,7 +1721,7 @@ tk.algorithm = algorithm; tk.key = content; - txn.put(tk); + txn.put(tk, 0, d_random_ids); txn.commit(); return true; @@ -1740,8 +1758,10 @@ declare(suffix, "filename", "Filename for lmdb", "./pdns.lmdb"); declare(suffix, "sync-mode", "Synchronisation mode: nosync, nometasync, mapasync, sync", "mapasync"); // there just is no room for more on 32 bit - declare(suffix, "shards", "Records database will be split into this number of shards", (sizeof(long) == 4) ? "2" : "64"); + declare(suffix, "shards", "Records database will be split into this number of shards", (sizeof(void*) == 4) ? "2" : "64"); declare(suffix, "schema-version", "Maximum allowed schema version to run on this DB. If a lower version is found, auto update is performed", std::to_string(SCHEMAVERSION)); + declare(suffix, "random-ids", "Numeric IDs inside the database are generated randomly instead of sequentially", "no"); + declare(suffix, "map-size", "LMDB map size in megabytes", (sizeof(void*) == 4) ? "100" : "16000"); } DNSBackend* make(const string& suffix = "") override { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/modules/lmdbbackend/lmdbbackend.hh new/pdns-4.6.2/modules/lmdbbackend/lmdbbackend.hh --- old/pdns-4.6.1/modules/lmdbbackend/lmdbbackend.hh 2022-03-21 09:46:56.000000000 +0100 +++ new/pdns-4.6.2/modules/lmdbbackend/lmdbbackend.hh 2022-04-04 19:51:40.000000000 +0200 @@ -219,9 +219,9 @@ { DNSName domain; std::string content; - unsigned int flags; - bool active; - bool published; + unsigned int flags{0}; + bool active{true}; + bool published{true}; }; class LMDBResourceRecord : public DNSResourceRecord { @@ -311,5 +311,6 @@ DNSName d_transactiondomain; uint32_t d_transactiondomainid; bool d_dolog; + bool d_random_ids; DTime d_dtime; // used only for logging }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/pdns/Makefile.am new/pdns-4.6.2/pdns/Makefile.am --- old/pdns-4.6.1/pdns/Makefile.am 2022-03-21 09:46:56.000000000 +0100 +++ new/pdns-4.6.2/pdns/Makefile.am 2022-04-12 09:01:20.000000000 +0200 @@ -378,6 +378,7 @@ tsigutils.hh tsigutils.cc \ ueberbackend.cc \ unix_utility.cc \ + uuid-utils.hh uuid-utils.cc \ zoneparser-tng.cc pdnsutil_LDFLAGS = \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/pdns/Makefile.in new/pdns-4.6.2/pdns/Makefile.in --- old/pdns-4.6.1/pdns/Makefile.in 2022-03-21 09:47:48.000000000 +0100 +++ new/pdns-4.6.2/pdns/Makefile.in 2022-04-12 09:02:32.000000000 +0200 @@ -843,9 +843,9 @@ signingpipe.cc sillyrecords.cc sstuff.hh statbag.cc \ stubresolver.cc stubresolver.hh svc-records.cc svc-records.hh \ threadname.hh threadname.cc tsigutils.hh tsigutils.cc \ - ueberbackend.cc unix_utility.cc zoneparser-tng.cc \ - sodiumsigners.cc decafsigners.cc ssqlite3.cc ssqlite3.hh \ - pkcs11signers.cc pkcs11signers.hh + ueberbackend.cc unix_utility.cc uuid-utils.hh uuid-utils.cc \ + zoneparser-tng.cc sodiumsigners.cc decafsigners.cc ssqlite3.cc \ + ssqlite3.hh pkcs11signers.cc pkcs11signers.hh am_pdnsutil_OBJECTS = arguments.$(OBJEXT) auth-caches.$(OBJEXT) \ auth-packetcache.$(OBJEXT) auth-querycache.$(OBJEXT) \ auth-zonecache.$(OBJEXT) backends/gsql/gsqlbackend.$(OBJEXT) \ @@ -866,8 +866,8 @@ statbag.$(OBJEXT) stubresolver.$(OBJEXT) svc-records.$(OBJEXT) \ threadname.$(OBJEXT) tsigutils.$(OBJEXT) \ ueberbackend.$(OBJEXT) unix_utility.$(OBJEXT) \ - zoneparser-tng.$(OBJEXT) $(am__objects_7) $(am__objects_8) \ - $(am__objects_9) $(am__objects_1) + uuid-utils.$(OBJEXT) zoneparser-tng.$(OBJEXT) $(am__objects_7) \ + $(am__objects_8) $(am__objects_9) $(am__objects_1) pdnsutil_OBJECTS = $(am_pdnsutil_OBJECTS) pdnsutil_DEPENDENCIES = $(am__DEPENDENCIES_1) $(JSON11_LIBS) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ @@ -1966,9 +1966,9 @@ signingpipe.cc sillyrecords.cc sstuff.hh statbag.cc \ stubresolver.cc stubresolver.hh svc-records.cc svc-records.hh \ threadname.hh threadname.cc tsigutils.hh tsigutils.cc \ - ueberbackend.cc unix_utility.cc zoneparser-tng.cc \ - $(am__append_21) $(am__append_23) $(am__append_25) \ - $(am__append_27) + ueberbackend.cc unix_utility.cc uuid-utils.hh uuid-utils.cc \ + zoneparser-tng.cc $(am__append_21) $(am__append_23) \ + $(am__append_25) $(am__append_27) pdnsutil_LDFLAGS = \ $(AM_LDFLAGS) \ $(DYNLINKFLAGS) \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/pdns/api-swagger.json new/pdns-4.6.2/pdns/api-swagger.json --- old/pdns-4.6.1/pdns/api-swagger.json 2022-03-21 09:48:19.000000000 +0100 +++ new/pdns-4.6.2/pdns/api-swagger.json 2022-04-12 09:03:33.000000000 +0200 @@ -370,6 +370,18 @@ "description": "\u201ctrue\u201d (default) or \u201cfalse\u201d, whether to include the \u201crrsets\u201d in the response Zone object.", "type": "boolean", "default": true + }, + { + "name": "rrset_name", + "in": "query", + "description": "Limit output to RRsets for this name.", + "type": "string" + }, + { + "name": "rrset_type", + "in": "query", + "description": "Limit output to the RRset of this type. Can only be used together with rrset_name.", + "type": "string" } ], "responses": { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/pdns/api-swagger.yaml new/pdns-4.6.2/pdns/api-swagger.yaml --- old/pdns-4.6.1/pdns/api-swagger.yaml 2022-03-21 09:48:01.000000000 +0100 +++ new/pdns-4.6.2/pdns/api-swagger.yaml 2022-04-12 09:02:57.000000000 +0200 @@ -188,6 +188,14 @@ description: '???true??? (default) or ???false???, whether to include the ???rrsets??? in the response Zone object.' type: boolean default: true + - name: rrset_name + in: query + description: Limit output to RRsets for this name. + type: string + - name: rrset_type + in: query + description: Limit output to the RRset of this type. Can only be used together with rrset_name. + type: string responses: '200': description: A Zone diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/pdns/common_startup.cc new/pdns-4.6.2/pdns/common_startup.cc --- old/pdns-4.6.1/pdns/common_startup.cc 2022-03-21 09:46:56.000000000 +0100 +++ new/pdns-4.6.2/pdns/common_startup.cc 2022-04-04 19:51:40.000000000 +0200 @@ -60,7 +60,7 @@ std::unique_ptr<DynListener> dl{nullptr}; CommunicatorClass Communicator; shared_ptr<UDPNameserver> N; -double avg_latency{0.0}; +double avg_latency{0.0}, receive_latency{0.0}, cache_latency{0.0}, backend_latency{0.0}, send_latency{0.0}; unique_ptr<TCPNameserver> TN; static vector<DNSDistributor*> g_distributors; vector<std::shared_ptr<UDPNameserver> > g_udpReceivers; @@ -315,6 +315,26 @@ return round(avg_latency); } +static uint64_t getReceiveLatency(const std::string& str) +{ + return round(receive_latency); +} + +static uint64_t getCacheLatency(const std::string& str) +{ + return round(cache_latency); +} + +static uint64_t getBackendLatency(const std::string& str) +{ + return round(backend_latency); +} + +static uint64_t getSendLatency(const std::string& str) +{ + return round(send_latency); +} + void declareStats() { S.declare("udp-queries","Number of UDP queries received"); @@ -395,6 +415,10 @@ S.declare("servfail-packets","Number of times a server-failed packet was sent out"); S.declare("unauth-packets", "Number of times a zone we are not auth for was queried"); S.declare("latency","Average number of microseconds needed to answer a question", getLatency, StatType::gauge); + S.declare("receive-latency", "Average number of microseconds needed to receive a query", getReceiveLatency, StatType::gauge); + S.declare("cache-latency", "Average number of microseconds needed for a packet cache lookup", getCacheLatency, StatType::gauge); + S.declare("backend-latency", "Average number of microseconds needed for a backend lookup", getBackendLatency, StatType::gauge); + S.declare("send-latency", "Average number of microseconds needed to send the answer", getSendLatency, StatType::gauge); S.declare("timedout-packets","Number of packets which weren't answered within timeout set"); S.declare("security-status", "Security status based on regular polling", StatType::gauge); S.declare( @@ -417,16 +441,22 @@ return !!p; } -static void sendout(std::unique_ptr<DNSPacket>& a) +static void sendout(std::unique_ptr<DNSPacket>& a, int start) { if(!a) return; try { + int diff = a->d_dt.udiffNoReset(); + backend_latency = 0.999 * backend_latency + 0.001 * std::max(diff - start, 0); + start = diff; + N->send(*a); - int diff=a->d_dt.udiff(); - avg_latency=0.999*avg_latency+0.001*diff; + diff = a->d_dt.udiff(); + send_latency = 0.999 * send_latency + 0.001 * std::max(diff - start, 0); + + avg_latency = 0.999 * avg_latency + 0.001 * std::max(diff, 0); } catch (const std::exception& e) { g_log<<Logger::Error<<"Caught unhandled exception while sending a response: "<<e.what()<<endl; @@ -453,10 +483,11 @@ AtomicCounter &numreceived6=*S.getPointer("udp6-queries"); AtomicCounter &overloadDrops=*S.getPointer("overload-drops"); - int diff; + int diff, start; bool logDNSQueries = ::arg().mustDo("log-dns-queries"); shared_ptr<UDPNameserver> NS; std::string buffer; + ComboAddress accountremote; // If we have SO_REUSEPORT then create a new port for all receiver threads // other than the first one. @@ -482,9 +513,16 @@ continue; // packet was broken, try again } + diff = question.d_dt.udiffNoReset(); + receive_latency = 0.999 * receive_latency + 0.001 * std::max(diff, 0); + numreceived++; - if(question.d_remote.getSocklen()==sizeof(sockaddr_in)) + accountremote = question.d_remote; + if (question.d_inner_remote) + accountremote = *question.d_inner_remote; + + if (accountremote.sin4.sin_family == AF_INET) numreceived4++; else numreceived6++; @@ -508,22 +546,33 @@ } if(PC.enabled() && (question.d.opcode != Opcode::Notify && question.d.opcode != Opcode::Update) && question.couldBeCached()) { + start = diff; bool haveSomething=PC.get(question, cached); // does the PacketCache recognize this question? if (haveSomething) { if(logDNSQueries) g_log<<": packetcache HIT"<<endl; cached.setRemote(&question.d_remote); // inlined + cached.d_inner_remote = question.d_inner_remote; cached.setSocket(question.getSocket()); // inlined cached.d_anyLocal = question.d_anyLocal; cached.setMaxReplyLen(question.getMaxReplyLen()); cached.d.rd=question.d.rd; // copy in recursion desired bit cached.d.id=question.d.id; cached.commitD(); // commit d to the packet inlined + + diff = question.d_dt.udiffNoReset(); + cache_latency = 0.999 * cache_latency + 0.001 * std::max(diff - start, 0); + start = diff; + NS->send(cached); // answer it then inlined + diff=question.d_dt.udiff(); - avg_latency=0.999*avg_latency+0.001*diff; // 'EWMA' + send_latency = 0.999 * send_latency + 0.001 * std::max(diff - start, 0); + avg_latency = 0.999 * avg_latency + 0.001 * std::max(diff, 0); // 'EWMA' continue; } + diff = question.d_dt.udiffNoReset(); + cache_latency = 0.999 * cache_latency + 0.001 * std::max(diff - start, 0); } if(distributor->isOverloaded()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/pdns/distributor.hh new/pdns-4.6.2/pdns/distributor.hh --- old/pdns-4.6.1/pdns/distributor.hh 2022-03-21 09:46:56.000000000 +0100 +++ new/pdns-4.6.2/pdns/distributor.hh 2022-04-04 19:51:40.000000000 +0200 @@ -51,7 +51,7 @@ { public: static Distributor* Create(int n=1); //!< Create a new Distributor with \param n threads - typedef std::function<void(std::unique_ptr<Answer>&)> callback_t; + typedef std::function<void(std::unique_ptr<Answer>&, int)> callback_t; virtual int question(Question&, callback_t callback) =0; //!< Submit a question to the Distributor virtual int getQueueSize() =0; //!< Returns length of question queue virtual bool isOverloaded() =0; @@ -65,7 +65,7 @@ SingleThreadDistributor(const SingleThreadDistributor&) = delete; void operator=(const SingleThreadDistributor&) = delete; SingleThreadDistributor(); - typedef std::function<void(std::unique_ptr<Answer>&)> callback_t; + typedef std::function<void(std::unique_ptr<Answer>&, int)> callback_t; int question(Question&, callback_t callback) override; //!< Submit a question to the Distributor int getQueueSize() override { return 0; @@ -87,7 +87,7 @@ MultiThreadDistributor(const MultiThreadDistributor&) = delete; void operator=(const MultiThreadDistributor&) = delete; MultiThreadDistributor(int n); - typedef std::function<void(std::unique_ptr<Answer>&)> callback_t; + typedef std::function<void(std::unique_ptr<Answer>&, int)> callback_t; int question(Question&, callback_t callback) override; //!< Submit a question to the Distributor void distribute(int n); int getQueueSize() override { @@ -98,11 +98,13 @@ { QuestionData(const Question& query): Q(query) { + start = Q.d_dt.udiff(); } Question Q; callback_t callback{nullptr}; int id{0}; + int start{0}; }; bool isOverloaded() override @@ -242,7 +244,7 @@ } } - QD->callback(a); + QD->callback(a, QD->start); QD.reset(); } @@ -264,6 +266,7 @@ template<class Answer, class Question, class Backend>int SingleThreadDistributor<Answer,Question,Backend>::question(Question& q, callback_t callback) { + int start = q.d_dt.udiff(); std::unique_ptr<Answer> a = nullptr; bool allowRetry=true; retry: @@ -302,7 +305,7 @@ goto retry; } } - callback(a); + callback(a, start); return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/pdns/lua-record.cc new/pdns-4.6.2/pdns/lua-record.cc --- old/pdns-4.6.1/pdns/lua-record.cc 2022-03-21 09:46:56.000000000 +0100 +++ new/pdns-4.6.2/pdns/lua-record.cc 2022-04-04 19:51:41.000000000 +0200 @@ -87,6 +87,7 @@ private: void checkURL(const CheckDesc& cd, const bool status, const bool first = false) { + string remstring; try { int timeout = 2; if (cd.opts.count("timeout")) { @@ -99,24 +100,33 @@ MiniCurl mc(useragent); string content; + const ComboAddress* rem = nullptr; + if(cd.rem.sin4.sin_family != AF_UNSPEC) { + rem = &cd.rem; + remstring = rem->toString(); + } else { + remstring = "[externally checked IP]"; + } + if (cd.opts.count("source")) { ComboAddress src(cd.opts.at("source")); - content=mc.getURL(cd.url, &cd.rem, &src, timeout); + content=mc.getURL(cd.url, rem, &src, timeout); } else { - content=mc.getURL(cd.url, &cd.rem, nullptr, timeout); + content=mc.getURL(cd.url, rem, nullptr, timeout); } if (cd.opts.count("stringmatch") && content.find(cd.opts.at("stringmatch")) == string::npos) { throw std::runtime_error(boost::str(boost::format("unable to match content with `%s`") % cd.opts.at("stringmatch"))); } + if(!status) { - g_log<<Logger::Info<<"LUA record monitoring declaring "<<cd.rem.toString()<<" UP for URL "<<cd.url<<"!"<<endl; + g_log<<Logger::Info<<"LUA record monitoring declaring "<<remstring<<" UP for URL "<<cd.url<<"!"<<endl; } setUp(cd); } catch(std::exception& ne) { if(status || first) - g_log<<Logger::Info<<"LUA record monitoring declaring "<<cd.rem.toString()<<" DOWN for URL "<<cd.url<<", error: "<<ne.what()<<endl; + g_log<<Logger::Info<<"LUA record monitoring declaring "<<remstring<<" DOWN for URL "<<cd.url<<", error: "<<ne.what()<<endl; setDown(cd); } } @@ -785,6 +795,39 @@ return convIpListToString(res); }); + lua.writeFunction("ifurlextup", [](const vector<pair<int, opts_t> >& ipurls, boost::optional<opts_t> options) { + vector<ComboAddress> candidates; + opts_t opts; + if(options) + opts = *options; + + ComboAddress ca_unspec; + ca_unspec.sin4.sin_family=AF_UNSPEC; + + // ipurls: { { ["192.0.2.1"] = "https://example.com", ["192.0.2.2"] = "https://example.com/404" } } + for (const auto& [count, unitmap] : ipurls) { + // unitmap: 1 = { ["192.0.2.1"] = "https://example.com", ["192.0.2.2"] = "https://example.com/404" } + vector<ComboAddress> available; + + for (const auto& [ipStr, url] : unitmap) { + // unit: ["192.0.2.1"] = "https://example.com" + ComboAddress ip(ipStr); + candidates.push_back(ip); + if (g_up.isUp(ca_unspec, url, opts)) { + available.push_back(ip); + } + } + if(!available.empty()) { + vector<ComboAddress> res = useSelector(getOptionValue(options, "selector", "random"), s_lua_record_ctx->bestwho, available); + return convIpListToString(res); + } + } + + // All units down, apply backupSelector on all candidates + vector<ComboAddress> res = useSelector(getOptionValue(options, "backupSelector", "random"), s_lua_record_ctx->bestwho, candidates); + return convIpListToString(res); + }); + lua.writeFunction("ifurlup", [](const std::string& url, const boost::variant<iplist_t, ipunitlist_t>& ips, boost::optional<opts_t> options) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/pdns/tcpreceiver.cc new/pdns-4.6.2/pdns/tcpreceiver.cc --- old/pdns-4.6.1/pdns/tcpreceiver.cc 2022-03-21 09:46:56.000000000 +0100 +++ new/pdns-4.6.2/pdns/tcpreceiver.cc 2022-04-12 09:01:20.000000000 +0200 @@ -221,7 +221,7 @@ { setThreadName("pdns/tcpConnect"); std::unique_ptr<DNSPacket> packet; - ComboAddress remote; + ComboAddress remote, accountremote; socklen_t remotelen=sizeof(remote); size_t transactions = 0; time_t start = 0; @@ -296,6 +296,10 @@ } inner_remote = psource; inner_tcp = tcp; + accountremote = psource; + } + else { + accountremote = remote; } for(;;) { @@ -334,8 +338,8 @@ } getQuestion(fd, mesg.get(), pktlen, remote, remainingTime); - S.inc("tcp-queries"); - if(remote.sin4.sin_family == AF_INET6) + S.inc("tcp-queries"); + if (accountremote.sin4.sin_family == AF_INET6) S.inc("tcp6-queries"); else S.inc("tcp4-queries"); @@ -376,6 +380,7 @@ if(logDNSQueries) g_log<<": packetcache HIT"<<endl; cached->setRemote(&packet->d_remote); + cached->d_inner_remote = packet->d_inner_remote; cached->d.id=packet->d.id; cached->d.rd=packet->d.rd; // copy in recursion desired bit cached->commitD(); // commit d to the packet inlined diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/pdns/test-distributor_hh.cc new/pdns-4.6.2/pdns/test-distributor_hh.cc --- old/pdns-4.6.1/pdns/test-distributor_hh.cc 2022-03-21 09:46:56.000000000 +0100 +++ new/pdns-4.6.2/pdns/test-distributor_hh.cc 2022-04-04 19:51:41.000000000 +0200 @@ -33,7 +33,7 @@ }; static std::atomic<int> g_receivedAnswers; -static void report(std::unique_ptr<DNSPacket>& A) +static void report(std::unique_ptr<DNSPacket>& A, int B) { g_receivedAnswers++; } @@ -67,7 +67,7 @@ }; static std::atomic<int> g_receivedAnswers1; -static void report1(std::unique_ptr<DNSPacket>& A) +static void report1(std::unique_ptr<DNSPacket>& A, int B) { g_receivedAnswers1++; } @@ -119,7 +119,7 @@ std::atomic<int> g_receivedAnswers2; -static void report2(std::unique_ptr<DNSPacket>& A) +static void report2(std::unique_ptr<DNSPacket>& A, int B) { g_receivedAnswers2++; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pdns-4.6.1/pdns/ws-auth.cc new/pdns-4.6.2/pdns/ws-auth.cc --- old/pdns-4.6.1/pdns/ws-auth.cc 2022-03-21 09:46:56.000000000 +0100 +++ new/pdns-4.6.2/pdns/ws-auth.cc 2022-04-12 09:01:20.000000000 +0200 @@ -348,7 +348,7 @@ throw ApiException("'rrsets' request parameter value '"+req->getvars["rrsets"]+"' is not supported"); } -static void fillZone(UeberBackend& B, const DNSName& zonename, HttpResponse* resp, bool doRRSets) { +static void fillZone(UeberBackend& B, const DNSName& zonename, HttpResponse* resp, HttpRequest* req) { DomainInfo di; if(!B.getDomainInfo(zonename, di)) { throw HttpNotFoundException(); @@ -395,14 +395,24 @@ } doc["slave_tsig_key_ids"] = tsig_slave_keys; - if (doRRSets) { + if (shouldDoRRSets(req)) { vector<DNSResourceRecord> records; vector<Comment> comments; // load all records + sort { DNSResourceRecord rr; - di.backend->list(zonename, di.id, true); // incl. disabled + if (req->getvars.count("rrset_name") == 0) { + di.backend->list(zonename, di.id, true); // incl. disabled + } else { + QType qt; + if (req->getvars.count("rrset_type") == 0) { + qt = QType::ANY; + } else { + qt = req->getvars["rrset_type"]; + } + di.backend->lookup(qt, DNSName(req->getvars["rrset_name"]), di.id); + } while(di.backend->get(rr)) { if (!rr.qtype.getCode()) continue; // skip empty non-terminals @@ -1817,7 +1827,7 @@ g_zoneCache.add(zonename, di.id); // make new zone visible - fillZone(B, zonename, resp, shouldDoRRSets(req)); + fillZone(B, zonename, resp, req); resp->status = 201; return; } @@ -1913,7 +1923,7 @@ patchZone(B, req, resp); return; } else if (req->method == "GET") { - fillZone(B, zonename, resp, shouldDoRRSets(req)); + fillZone(B, zonename, resp, req); return; } throw HttpMethodNotAllowedException();
