Browse Source

New upstream version 4.4.0

tags/upstream/4.4.1
Chris Hofstaedtler 5 months ago
parent
commit
0752faed8b
100 changed files with 4830 additions and 2226 deletions
  1. +9
    -1
      Makefile.am
  2. +194
    -164
      Makefile.in
  3. +32
    -2
      RECURSOR-MIB.txt
  4. +45
    -14
      arguments.cc
  5. +5
    -6
      arguments.hh
  6. +248
    -0
      axfr-retriever.cc
  7. +56
    -0
      axfr-retriever.hh
  8. +1
    -1
      base32.cc
  9. +1
    -4
      base32.hh
  10. +1
    -5
      base64.hh
  11. +91
    -45
      cachecleaner.hh
  12. +1
    -5
      comment.hh
  13. +15
    -0
      config.h.in
  14. +16
    -16
      configure
  15. +4
    -4
      configure.ac
  16. +1
    -1
      contrib/kv-example-script.lua
  17. +8
    -11
      devpollmplexer.cc
  18. +5
    -4
      dns.hh
  19. +1
    -1
      dns_random.cc
  20. +24
    -3
      dns_random.hh
  21. +16
    -9
      dnsbackend.hh
  22. +18
    -18
      dnslabeltext.cc
  23. +2
    -2
      dnslabeltext.rl
  24. +2
    -0
      dnsmessage.proto
  25. +25
    -3
      dnsname.cc
  26. +27
    -5
      dnsname.hh
  27. +2
    -7
      dnspacket.hh
  28. +18
    -124
      dnsparser.cc
  29. +121
    -6
      dnsparser.hh
  30. +221
    -1
      dnsrecords.cc
  31. +24
    -4
      dnsrecords.hh
  32. +3
    -52
      dnssecinfra.cc
  33. +1
    -4
      dnssecinfra.hh
  34. +33
    -21
      dnsseckeeper.hh
  35. +1
    -1
      dnstap.proto
  36. +3
    -3
      dnswriter.cc
  37. +3
    -6
      dnswriter.hh
  38. +1
    -4
      ednscookies.hh
  39. +23
    -0
      ednsoptions.cc
  40. +3
    -5
      ednsoptions.hh
  41. +1
    -4
      ednssubnet.hh
  42. +111
    -24
      effective_tld_names.dat
  43. +1
    -1
      ext/luawrapper/include/LuaContext.hpp
  44. +1
    -1
      ext/yahttp/yahttp/reqresp.hpp
  45. +12
    -1
      ext/yahttp/yahttp/url.hpp
  46. +243
    -107
      filterpo.cc
  47. +127
    -41
      filterpo.hh
  48. +5
    -2
      fstrm_logger.cc
  49. +7
    -4
      fstrm_logger.hh
  50. +0
    -4
      gss_context.hh
  51. +22
    -0
      iputils.cc
  52. +641
    -297
      iputils.hh
  53. +1
    -5
      lazy_allocator.hh
  54. +117
    -113
      lock.hh
  55. +14
    -6
      logger.cc
  56. +1
    -1
      logger.hh
  57. +2
    -13
      lua-base4.cc
  58. +0
    -7
      lua-base4.hh
  59. +11
    -0
      lua-recursor4-ffi.hh
  60. +150
    -112
      lua-recursor4.cc
  61. +28
    -6
      lua-recursor4.hh
  62. +4
    -1
      lwres.cc
  63. +1
    -3
      lwres.hh
  64. +1
    -1
      m4/pdns_check_libcrypto.m4
  65. +78
    -86
      misc.cc
  66. +4
    -6
      misc.hh
  67. +4
    -7
      mplexer.hh
  68. +1
    -5
      mtasker.hh
  69. +1
    -6
      mtasker_context.hh
  70. +1
    -4
      namespaces.hh
  71. +14
    -8
      negcache.cc
  72. +5
    -5
      negcache.hh
  73. +17
    -23
      opensslsigners.cc
  74. +1
    -5
      packetcache.hh
  75. +4
    -7
      pdns_recursor.1
  76. +716
    -369
      pdns_recursor.cc
  77. +1
    -6
      pdnsexception.hh
  78. +257
    -0
      proxy-protocol.cc
  79. +46
    -0
      proxy-protocol.hh
  80. +85
    -9
      pubsuffix.cc
  81. +3
    -4
      qtype.hh
  82. +100
    -0
      query-local-address.cc
  83. +59
    -0
      query-local-address.hh
  84. +1
    -1
      rcpgenerator.cc
  85. +1
    -3
      rcpgenerator.hh
  86. +1
    -1
      rec-carbon.cc
  87. +22
    -5
      rec-lua-conf.cc
  88. +21
    -1
      rec-protobuf.cc
  89. +3
    -1
      rec-protobuf.hh
  90. +6
    -0
      rec-snmp.cc
  91. +21
    -5
      rec-snmp.hh
  92. +1
    -1
      rec_channel.hh
  93. +107
    -91
      rec_channel_rec.cc
  94. +20
    -12
      rec_control.1
  95. +8
    -1
      rec_metrics.hh
  96. +1
    -1
      recpacketcache.cc
  97. +2
    -5
      recpacketcache.hh
  98. +276
    -166
      recursor_cache.cc
  99. +85
    -40
      recursor_cache.hh
  100. +51
    -26
      reczones.cc

+ 9
- 1
Makefile.am View File

@@ -144,9 +144,11 @@ pdns_recursor_SOURCES = \
pdnsexception.hh \
pollmplexer.cc \
protobuf.cc protobuf.hh \
proxy-protocol.cc proxy-protocol.hh \
pubsuffix.hh pubsuffix.cc \
pubsuffixloader.cc \
qtype.hh qtype.cc \
query-local-address.hh query-local-address.cc \
rcpgenerator.cc rcpgenerator.hh \
rec-carbon.cc \
rec-lua-conf.hh rec-lua-conf.cc \
@@ -159,6 +161,7 @@ pdns_recursor_SOURCES = \
reczones.cc \
remote_logger.cc remote_logger.hh \
resolver.hh resolver.cc \
axfr-retriever.hh axfr-retriever.cc \
resolve-context.hh \
responsestats.hh responsestats.cc \
root-addresses.hh \
@@ -167,6 +170,7 @@ pdns_recursor_SOURCES = \
secpoll-recursor.cc secpoll-recursor.hh \
secpoll.cc secpoll.hh \
sholder.hh \
shuffle.cc shuffle.hh \
sillyrecords.cc \
snmp-agent.hh snmp-agent.cc \
sortlist.cc sortlist.hh \
@@ -190,9 +194,10 @@ pdns_recursor_SOURCES = \
if !HAVE_LUA_HPP
BUILT_SOURCES += lua.hpp
nodist_pdns_recursor_SOURCES = lua.hpp
CLEANFILES += lua.hpp
endif

CLEANFILES += lua.hpp

pdns_recursor_LDADD = \
$(YAHTTP_LIBS) \
$(JSON11_LIBS) \
@@ -219,6 +224,7 @@ endif

testrunner_SOURCES = \
arguments.cc \
axfr-retriever.hh axfr-retriever.cc \
base32.cc \
base64.cc base64.hh \
circular_buffer.hh \
@@ -250,6 +256,7 @@ testrunner_SOURCES = \
pollmplexer.cc \
protobuf.cc protobuf.hh \
qtype.cc qtype.hh \
query-local-address.hh query-local-address.cc \
rcpgenerator.cc \
rec-protobuf.cc rec-protobuf.hh \
recpacketcache.cc recpacketcache.hh \
@@ -299,6 +306,7 @@ testrunner_SOURCES = \
test-syncres_cc7.cc \
test-syncres_cc8.cc \
test-syncres_cc9.cc \
test-syncres_cc10.cc \
test-tsig.cc \
test-xpf_cc.cc \
testrunner.cc \


+ 194
- 164
Makefile.in View File

@@ -102,66 +102,65 @@ TESTS = test_libcrypto $(am__EXEEXT_1)
@UNIT_TESTS_TRUE@noinst_PROGRAMS = testrunner$(EXEEXT)
@UNIT_TESTS_TRUE@am__append_4 = testrunner
@HAVE_LUA_HPP_FALSE@am__append_5 = lua.hpp
@HAVE_LUA_HPP_FALSE@am__append_6 = lua.hpp
@NOD_ENABLED_TRUE@am__append_7 = nod.hh nod.cc
@NOD_ENABLED_TRUE@am__append_8 = \
@NOD_ENABLED_TRUE@am__append_6 = nod.hh nod.cc
@NOD_ENABLED_TRUE@am__append_7 = \
@NOD_ENABLED_TRUE@ $(BOOST_FILESYSTEM_LIBS)

@NOD_ENABLED_TRUE@am__append_9 = \
@NOD_ENABLED_TRUE@am__append_8 = \
@NOD_ENABLED_TRUE@ $(BOOST_FILESYSTEM_LDFLAGS)

@NOD_ENABLED_TRUE@am__append_10 = nod.hh nod.cc \
@NOD_ENABLED_TRUE@am__append_9 = nod.hh nod.cc \
@NOD_ENABLED_TRUE@ test-nod_cc.cc

@NOD_ENABLED_TRUE@am__append_11 = \
@NOD_ENABLED_TRUE@am__append_10 = \
@NOD_ENABLED_TRUE@ $(BOOST_FILESYSTEM_LIBS)

@NOD_ENABLED_TRUE@am__append_12 = \
@NOD_ENABLED_TRUE@am__append_11 = \
@NOD_ENABLED_TRUE@ $(BOOST_FILESYSTEM_LDFLAGS)

@LIBSODIUM_TRUE@am__append_13 = \
@LIBSODIUM_TRUE@am__append_12 = \
@LIBSODIUM_TRUE@ sodiumsigners.cc

@LIBSODIUM_TRUE@am__append_14 = $(LIBSODIUM_LIBS)
@LIBSODIUM_TRUE@am__append_15 = \
@LIBSODIUM_TRUE@am__append_13 = $(LIBSODIUM_LIBS)
@LIBSODIUM_TRUE@am__append_14 = \
@LIBSODIUM_TRUE@ sodiumsigners.cc

@LIBSODIUM_TRUE@am__append_16 = $(LIBSODIUM_LIBS)
@LIBDECAF_TRUE@am__append_17 = \
@LIBSODIUM_TRUE@am__append_15 = $(LIBSODIUM_LIBS)
@LIBDECAF_TRUE@am__append_16 = \
@LIBDECAF_TRUE@ decafsigners.cc

@LIBDECAF_TRUE@am__append_18 = $(LIBDECAF_LIBS)
@MALLOC_TRACE_TRUE@am__append_19 = \
@LIBDECAF_TRUE@am__append_17 = $(LIBDECAF_LIBS)
@MALLOC_TRACE_TRUE@am__append_18 = \
@MALLOC_TRACE_TRUE@ malloctrace.cc \
@MALLOC_TRACE_TRUE@ malloctrace.hh

@MALLOC_TRACE_TRUE@am__append_20 = -rdynamic
@LUA_TRUE@am__append_21 = $(LUA_LIBS)
@MALLOC_TRACE_TRUE@am__append_19 = -rdynamic
@LUA_TRUE@am__append_20 = $(LUA_LIBS)
@HAVE_FREEBSD_TRUE@am__append_21 = kqueuemplexer.cc
@HAVE_FREEBSD_TRUE@am__append_22 = kqueuemplexer.cc
@HAVE_FREEBSD_TRUE@am__append_23 = kqueuemplexer.cc
@HAVE_LINUX_TRUE@am__append_23 = epollmplexer.cc
@HAVE_LINUX_TRUE@am__append_24 = epollmplexer.cc
@HAVE_LINUX_TRUE@am__append_25 = epollmplexer.cc
@HAVE_SOLARIS_TRUE@am__append_26 = \
@HAVE_SOLARIS_TRUE@am__append_25 = \
@HAVE_SOLARIS_TRUE@ devpollmplexer.cc \
@HAVE_SOLARIS_TRUE@ portsmplexer.cc

@HAVE_SOLARIS_TRUE@am__append_27 = \
@HAVE_SOLARIS_TRUE@am__append_26 = \
@HAVE_SOLARIS_TRUE@ devpollmplexer.cc \
@HAVE_SOLARIS_TRUE@ portsmplexer.cc

@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@am__append_28 = dnsmessage.pb.cc
@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@am__append_29 = $(PROTOBUF_LIBS)
@FSTRM_TRUE@@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@am__append_30 = dnstap.pb.cc
@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@am__append_27 = dnsmessage.pb.cc
@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@am__append_28 = $(PROTOBUF_LIBS)
@FSTRM_TRUE@@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@am__append_29 = dnstap.pb.cc
@FSTRM_TRUE@@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@am__append_30 = dnstap.pb.cc dnstap.pb.h
@FSTRM_TRUE@@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@am__append_31 = dnstap.pb.cc dnstap.pb.h
@FSTRM_TRUE@@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@am__append_32 = dnstap.pb.cc dnstap.pb.h
@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@am__append_33 = $(PROTOBUF_LIBS)
@FSTRM_TRUE@am__append_34 = \
@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@am__append_32 = $(PROTOBUF_LIBS)
@FSTRM_TRUE@am__append_33 = \
@FSTRM_TRUE@ dnstap.cc dnstap.hh rec-dnstap.hh

@FSTRM_TRUE@am__append_35 = \
@FSTRM_TRUE@am__append_34 = \
@FSTRM_TRUE@ $(FSTRM_LIBS)

@HAVE_SYSTEMD_TRUE@am__append_36 = \
@HAVE_SYSTEMD_TRUE@am__append_35 = \
@HAVE_SYSTEMD_TRUE@ pdns-recursor.service \
@HAVE_SYSTEMD_TRUE@ pdns-recursor@.service

@@ -236,29 +235,32 @@ am__pdns_recursor_SOURCES_DIST = arguments.cc ascii.hh base32.cc \
mtasker_context.hh namespaces.hh negcache.hh negcache.cc \
nsecrecords.cc opensslsigners.cc opensslsigners.hh \
packetcache.hh pdns_recursor.cc pdnsexception.hh \
pollmplexer.cc protobuf.cc protobuf.hh pubsuffix.hh \
pubsuffix.cc pubsuffixloader.cc qtype.hh qtype.cc \
rcpgenerator.cc rcpgenerator.hh rec-carbon.cc rec-lua-conf.hh \
rec-lua-conf.cc rec-protobuf.cc rec-protobuf.hh rec-snmp.hh \
rec-snmp.cc rec_channel.cc rec_channel.hh rec_metrics.hh \
rec_channel_rec.cc recpacketcache.cc recpacketcache.hh \
recursor_cache.cc recursor_cache.hh reczones.cc \
remote_logger.cc remote_logger.hh resolver.hh resolver.cc \
resolve-context.hh responsestats.hh responsestats.cc \
root-addresses.hh root-dnssec.hh rpzloader.cc rpzloader.hh \
secpoll-recursor.cc secpoll-recursor.hh secpoll.cc secpoll.hh \
sholder.hh sillyrecords.cc snmp-agent.hh snmp-agent.cc \
sortlist.cc sortlist.hh sstuff.hh stable-bloom.hh syncres.cc \
syncres.hh threadname.hh threadname.cc tsigverifier.cc \
tsigverifier.hh ueberbackend.hh unix_utility.cc utility.hh \
uuid-utils.hh uuid-utils.cc validate.cc validate.hh \
validate-recursor.cc validate-recursor.hh version.cc \
version.hh webserver.cc webserver.hh ws-api.cc ws-api.hh \
ws-recursor.cc ws-recursor.hh xpf.cc xpf.hh zoneparser-tng.cc \
zoneparser-tng.hh nod.hh nod.cc sodiumsigners.cc \
decafsigners.cc malloctrace.cc malloctrace.hh kqueuemplexer.cc \
epollmplexer.cc devpollmplexer.cc portsmplexer.cc dnstap.cc \
dnstap.hh rec-dnstap.hh
pollmplexer.cc protobuf.cc protobuf.hh proxy-protocol.cc \
proxy-protocol.hh pubsuffix.hh pubsuffix.cc pubsuffixloader.cc \
qtype.hh qtype.cc query-local-address.hh \
query-local-address.cc rcpgenerator.cc rcpgenerator.hh \
rec-carbon.cc rec-lua-conf.hh rec-lua-conf.cc rec-protobuf.cc \
rec-protobuf.hh rec-snmp.hh rec-snmp.cc rec_channel.cc \
rec_channel.hh rec_metrics.hh rec_channel_rec.cc \
recpacketcache.cc recpacketcache.hh recursor_cache.cc \
recursor_cache.hh reczones.cc remote_logger.cc \
remote_logger.hh resolver.hh resolver.cc axfr-retriever.hh \
axfr-retriever.cc resolve-context.hh responsestats.hh \
responsestats.cc root-addresses.hh root-dnssec.hh rpzloader.cc \
rpzloader.hh secpoll-recursor.cc secpoll-recursor.hh \
secpoll.cc secpoll.hh sholder.hh shuffle.cc shuffle.hh \
sillyrecords.cc snmp-agent.hh snmp-agent.cc sortlist.cc \
sortlist.hh sstuff.hh stable-bloom.hh syncres.cc syncres.hh \
threadname.hh threadname.cc tsigverifier.cc tsigverifier.hh \
ueberbackend.hh unix_utility.cc utility.hh uuid-utils.hh \
uuid-utils.cc validate.cc validate.hh validate-recursor.cc \
validate-recursor.hh version.cc version.hh webserver.cc \
webserver.hh ws-api.cc ws-api.hh ws-recursor.cc ws-recursor.hh \
xpf.cc xpf.hh zoneparser-tng.cc zoneparser-tng.hh nod.hh \
nod.cc sodiumsigners.cc decafsigners.cc malloctrace.cc \
malloctrace.hh kqueuemplexer.cc epollmplexer.cc \
devpollmplexer.cc portsmplexer.cc dnstap.cc dnstap.hh \
rec-dnstap.hh
@NOD_ENABLED_TRUE@am__objects_1 = nod.$(OBJEXT)
@LIBSODIUM_TRUE@am__objects_2 = sodiumsigners.$(OBJEXT)
@LIBDECAF_TRUE@am__objects_3 = decafsigners.$(OBJEXT)
@@ -280,18 +282,19 @@ am_pdns_recursor_OBJECTS = arguments.$(OBJEXT) base32.$(OBJEXT) \
mtasker_context.$(OBJEXT) negcache.$(OBJEXT) \
nsecrecords.$(OBJEXT) opensslsigners.$(OBJEXT) \
pdns_recursor.$(OBJEXT) pollmplexer.$(OBJEXT) \
protobuf.$(OBJEXT) pubsuffix.$(OBJEXT) \
pubsuffixloader.$(OBJEXT) qtype.$(OBJEXT) \
rcpgenerator.$(OBJEXT) rec-carbon.$(OBJEXT) \
rec-lua-conf.$(OBJEXT) rec-protobuf.$(OBJEXT) \
rec-snmp.$(OBJEXT) rec_channel.$(OBJEXT) \
rec_channel_rec.$(OBJEXT) recpacketcache.$(OBJEXT) \
recursor_cache.$(OBJEXT) reczones.$(OBJEXT) \
remote_logger.$(OBJEXT) resolver.$(OBJEXT) \
responsestats.$(OBJEXT) rpzloader.$(OBJEXT) \
secpoll-recursor.$(OBJEXT) secpoll.$(OBJEXT) \
sillyrecords.$(OBJEXT) snmp-agent.$(OBJEXT) sortlist.$(OBJEXT) \
syncres.$(OBJEXT) threadname.$(OBJEXT) tsigverifier.$(OBJEXT) \
protobuf.$(OBJEXT) proxy-protocol.$(OBJEXT) \
pubsuffix.$(OBJEXT) pubsuffixloader.$(OBJEXT) qtype.$(OBJEXT) \
query-local-address.$(OBJEXT) rcpgenerator.$(OBJEXT) \
rec-carbon.$(OBJEXT) rec-lua-conf.$(OBJEXT) \
rec-protobuf.$(OBJEXT) rec-snmp.$(OBJEXT) \
rec_channel.$(OBJEXT) rec_channel_rec.$(OBJEXT) \
recpacketcache.$(OBJEXT) recursor_cache.$(OBJEXT) \
reczones.$(OBJEXT) remote_logger.$(OBJEXT) resolver.$(OBJEXT) \
axfr-retriever.$(OBJEXT) responsestats.$(OBJEXT) \
rpzloader.$(OBJEXT) secpoll-recursor.$(OBJEXT) \
secpoll.$(OBJEXT) shuffle.$(OBJEXT) sillyrecords.$(OBJEXT) \
snmp-agent.$(OBJEXT) sortlist.$(OBJEXT) syncres.$(OBJEXT) \
threadname.$(OBJEXT) tsigverifier.$(OBJEXT) \
unix_utility.$(OBJEXT) uuid-utils.$(OBJEXT) validate.$(OBJEXT) \
validate-recursor.$(OBJEXT) version.$(OBJEXT) \
webserver.$(OBJEXT) ws-api.$(OBJEXT) ws-recursor.$(OBJEXT) \
@@ -335,55 +338,57 @@ am_rec_control_OBJECTS = arguments.$(OBJEXT) dnsname.$(OBJEXT) \
unix_utility.$(OBJEXT)
rec_control_OBJECTS = $(am_rec_control_OBJECTS)
rec_control_LDADD = $(LDADD)
am__testrunner_SOURCES_DIST = arguments.cc base32.cc base64.cc \
base64.hh circular_buffer.hh dns.cc dns.hh dns_random.cc \
dns_random.hh dnslabeltext.cc dnsname.cc dnsname.hh \
dnsparser.hh dnsparser.cc dnsrecords.cc dnssecinfra.cc \
dnsseckeeper.hh dnswriter.cc dnswriter.hh ednscookies.cc \
ednscookies.hh ednsoptions.cc ednsoptions.hh ednssubnet.cc \
ednssubnet.hh filterpo.cc filterpo.hh gettime.cc gettime.hh \
gss_context.cc gss_context.hh iputils.cc iputils.hh ixfr.cc \
ixfr.hh logger.cc logger.hh misc.cc misc.hh mtasker_context.cc \
negcache.hh negcache.cc namespaces.hh nsecrecords.cc \
pdnsexception.hh opensslsigners.cc opensslsigners.hh \
pollmplexer.cc protobuf.cc protobuf.hh qtype.cc qtype.hh \
rcpgenerator.cc rec-protobuf.cc rec-protobuf.hh \
recpacketcache.cc recpacketcache.hh recursor_cache.cc \
recursor_cache.hh responsestats.cc rpzloader.cc rpzloader.hh \
resolver.hh resolver.cc root-dnssec.hh secpoll.cc \
sillyrecords.cc sholder.hh sstuff.hh stable-bloom.hh \
syncres.cc syncres.hh test-arguments_cc.cc test-base32_cc.cc \
test-base64_cc.cc test-common.hh test-dnsrecordcontent.cc \
test-dns_random_hh.cc test-dnsname_cc.cc test-dnsparser_hh.cc \
test-dnsrecords_cc.cc test-ednsoptions_cc.cc \
test-filterpo_cc.cc test-iputils_hh.cc test-ixfr_cc.cc \
test-misc_hh.cc test-mtasker.cc test-mplexer.cc \
test-negcache_cc.cc test-packetcache_hh.cc \
am__testrunner_SOURCES_DIST = arguments.cc axfr-retriever.hh \
axfr-retriever.cc base32.cc base64.cc base64.hh \
circular_buffer.hh dns.cc dns.hh dns_random.cc dns_random.hh \
dnslabeltext.cc dnsname.cc dnsname.hh dnsparser.hh \
dnsparser.cc dnsrecords.cc dnssecinfra.cc dnsseckeeper.hh \
dnswriter.cc dnswriter.hh ednscookies.cc ednscookies.hh \
ednsoptions.cc ednsoptions.hh ednssubnet.cc ednssubnet.hh \
filterpo.cc filterpo.hh gettime.cc gettime.hh gss_context.cc \
gss_context.hh iputils.cc iputils.hh ixfr.cc ixfr.hh logger.cc \
logger.hh misc.cc misc.hh mtasker_context.cc negcache.hh \
negcache.cc namespaces.hh nsecrecords.cc pdnsexception.hh \
opensslsigners.cc opensslsigners.hh pollmplexer.cc protobuf.cc \
protobuf.hh qtype.cc qtype.hh query-local-address.hh \
query-local-address.cc rcpgenerator.cc rec-protobuf.cc \
rec-protobuf.hh recpacketcache.cc recpacketcache.hh \
recursor_cache.cc recursor_cache.hh responsestats.cc \
rpzloader.cc rpzloader.hh resolver.hh resolver.cc \
root-dnssec.hh secpoll.cc sillyrecords.cc sholder.hh sstuff.hh \
stable-bloom.hh syncres.cc syncres.hh test-arguments_cc.cc \
test-base32_cc.cc test-base64_cc.cc test-common.hh \
test-dnsrecordcontent.cc test-dns_random_hh.cc \
test-dnsname_cc.cc test-dnsparser_hh.cc test-dnsrecords_cc.cc \
test-ednsoptions_cc.cc test-filterpo_cc.cc test-iputils_hh.cc \
test-ixfr_cc.cc test-misc_hh.cc test-mtasker.cc \
test-mplexer.cc test-negcache_cc.cc test-packetcache_hh.cc \
test-rcpgenerator_cc.cc test-recpacketcache_cc.cc \
test-recursorcache_cc.cc test-rpzloader_cc.cc \
test-secpoll_cc.cc test-signers.cc test-syncres_cc.hh \
test-syncres_cc.cc test-syncres_cc1.cc test-syncres_cc2.cc \
test-syncres_cc3.cc test-syncres_cc4.cc test-syncres_cc5.cc \
test-syncres_cc6.cc test-syncres_cc7.cc test-syncres_cc8.cc \
test-syncres_cc9.cc test-tsig.cc test-xpf_cc.cc testrunner.cc \
threadname.hh threadname.cc tsigverifier.cc tsigverifier.hh \
unix_utility.cc validate.cc validate.hh validate-recursor.cc \
validate-recursor.hh xpf.cc xpf.hh zoneparser-tng.cc \
zoneparser-tng.hh nod.hh nod.cc test-nod_cc.cc \
sodiumsigners.cc kqueuemplexer.cc epollmplexer.cc \
devpollmplexer.cc portsmplexer.cc
test-syncres_cc9.cc test-syncres_cc10.cc test-tsig.cc \
test-xpf_cc.cc testrunner.cc threadname.hh threadname.cc \
tsigverifier.cc tsigverifier.hh unix_utility.cc validate.cc \
validate.hh validate-recursor.cc validate-recursor.hh xpf.cc \
xpf.hh zoneparser-tng.cc zoneparser-tng.hh nod.hh nod.cc \
test-nod_cc.cc sodiumsigners.cc kqueuemplexer.cc \
epollmplexer.cc devpollmplexer.cc portsmplexer.cc
@NOD_ENABLED_TRUE@am__objects_10 = nod.$(OBJEXT) test-nod_cc.$(OBJEXT)
am_testrunner_OBJECTS = arguments.$(OBJEXT) base32.$(OBJEXT) \
base64.$(OBJEXT) dns.$(OBJEXT) dns_random.$(OBJEXT) \
dnslabeltext.$(OBJEXT) dnsname.$(OBJEXT) dnsparser.$(OBJEXT) \
dnsrecords.$(OBJEXT) dnssecinfra.$(OBJEXT) dnswriter.$(OBJEXT) \
ednscookies.$(OBJEXT) ednsoptions.$(OBJEXT) \
ednssubnet.$(OBJEXT) filterpo.$(OBJEXT) gettime.$(OBJEXT) \
gss_context.$(OBJEXT) iputils.$(OBJEXT) ixfr.$(OBJEXT) \
logger.$(OBJEXT) misc.$(OBJEXT) mtasker_context.$(OBJEXT) \
negcache.$(OBJEXT) nsecrecords.$(OBJEXT) \
opensslsigners.$(OBJEXT) pollmplexer.$(OBJEXT) \
protobuf.$(OBJEXT) qtype.$(OBJEXT) rcpgenerator.$(OBJEXT) \
am_testrunner_OBJECTS = arguments.$(OBJEXT) axfr-retriever.$(OBJEXT) \
base32.$(OBJEXT) base64.$(OBJEXT) dns.$(OBJEXT) \
dns_random.$(OBJEXT) dnslabeltext.$(OBJEXT) dnsname.$(OBJEXT) \
dnsparser.$(OBJEXT) dnsrecords.$(OBJEXT) dnssecinfra.$(OBJEXT) \
dnswriter.$(OBJEXT) ednscookies.$(OBJEXT) \
ednsoptions.$(OBJEXT) ednssubnet.$(OBJEXT) filterpo.$(OBJEXT) \
gettime.$(OBJEXT) gss_context.$(OBJEXT) iputils.$(OBJEXT) \
ixfr.$(OBJEXT) logger.$(OBJEXT) misc.$(OBJEXT) \
mtasker_context.$(OBJEXT) negcache.$(OBJEXT) \
nsecrecords.$(OBJEXT) opensslsigners.$(OBJEXT) \
pollmplexer.$(OBJEXT) protobuf.$(OBJEXT) qtype.$(OBJEXT) \
query-local-address.$(OBJEXT) rcpgenerator.$(OBJEXT) \
rec-protobuf.$(OBJEXT) recpacketcache.$(OBJEXT) \
recursor_cache.$(OBJEXT) responsestats.$(OBJEXT) \
rpzloader.$(OBJEXT) resolver.$(OBJEXT) secpoll.$(OBJEXT) \
@@ -405,7 +410,8 @@ am_testrunner_OBJECTS = arguments.$(OBJEXT) base32.$(OBJEXT) \
test-syncres_cc4.$(OBJEXT) test-syncres_cc5.$(OBJEXT) \
test-syncres_cc6.$(OBJEXT) test-syncres_cc7.$(OBJEXT) \
test-syncres_cc8.$(OBJEXT) test-syncres_cc9.$(OBJEXT) \
test-tsig.$(OBJEXT) test-xpf_cc.$(OBJEXT) testrunner.$(OBJEXT) \
test-syncres_cc10.$(OBJEXT) test-tsig.$(OBJEXT) \
test-xpf_cc.$(OBJEXT) testrunner.$(OBJEXT) \
threadname.$(OBJEXT) tsigverifier.$(OBJEXT) \
unix_utility.$(OBJEXT) validate.$(OBJEXT) \
validate-recursor.$(OBJEXT) xpf.$(OBJEXT) \
@@ -439,7 +445,8 @@ am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__maybe_remake_depfiles = depfiles
am__depfiles_remade = ./$(DEPDIR)/arguments.Po ./$(DEPDIR)/base32.Po \
am__depfiles_remade = ./$(DEPDIR)/arguments.Po \
./$(DEPDIR)/axfr-retriever.Po ./$(DEPDIR)/base32.Po \
./$(DEPDIR)/base64.Po ./$(DEPDIR)/capabilities.Po \
./$(DEPDIR)/decafsigners.Po ./$(DEPDIR)/devpollmplexer.Po \
./$(DEPDIR)/dns.Po ./$(DEPDIR)/dns_random.Po \
@@ -461,8 +468,9 @@ am__depfiles_remade = ./$(DEPDIR)/arguments.Po ./$(DEPDIR)/base32.Po \
./$(DEPDIR)/nsecrecords.Po ./$(DEPDIR)/opensslsigners.Po \
./$(DEPDIR)/pdns_recursor.Po ./$(DEPDIR)/pollmplexer.Po \
./$(DEPDIR)/portsmplexer.Po ./$(DEPDIR)/protobuf.Po \
./$(DEPDIR)/pubsuffix.Po ./$(DEPDIR)/pubsuffixloader.Po \
./$(DEPDIR)/qtype.Po ./$(DEPDIR)/rcpgenerator.Po \
./$(DEPDIR)/proxy-protocol.Po ./$(DEPDIR)/pubsuffix.Po \
./$(DEPDIR)/pubsuffixloader.Po ./$(DEPDIR)/qtype.Po \
./$(DEPDIR)/query-local-address.Po ./$(DEPDIR)/rcpgenerator.Po \
./$(DEPDIR)/rec-carbon.Po ./$(DEPDIR)/rec-lua-conf.Po \
./$(DEPDIR)/rec-protobuf.Po ./$(DEPDIR)/rec-snmp.Po \
./$(DEPDIR)/rec_channel.Po ./$(DEPDIR)/rec_channel_rec.Po \
@@ -471,10 +479,11 @@ am__depfiles_remade = ./$(DEPDIR)/arguments.Po ./$(DEPDIR)/base32.Po \
./$(DEPDIR)/remote_logger.Po ./$(DEPDIR)/resolver.Po \
./$(DEPDIR)/responsestats.Po ./$(DEPDIR)/rpzloader.Po \
./$(DEPDIR)/secpoll-recursor.Po ./$(DEPDIR)/secpoll.Po \
./$(DEPDIR)/sillyrecords.Po ./$(DEPDIR)/snmp-agent.Po \
./$(DEPDIR)/sodiumsigners.Po ./$(DEPDIR)/sortlist.Po \
./$(DEPDIR)/syncres.Po ./$(DEPDIR)/test-arguments_cc.Po \
./$(DEPDIR)/test-base32_cc.Po ./$(DEPDIR)/test-base64_cc.Po \
./$(DEPDIR)/shuffle.Po ./$(DEPDIR)/sillyrecords.Po \
./$(DEPDIR)/snmp-agent.Po ./$(DEPDIR)/sodiumsigners.Po \
./$(DEPDIR)/sortlist.Po ./$(DEPDIR)/syncres.Po \
./$(DEPDIR)/test-arguments_cc.Po ./$(DEPDIR)/test-base32_cc.Po \
./$(DEPDIR)/test-base64_cc.Po \
./$(DEPDIR)/test-dns_random_hh.Po \
./$(DEPDIR)/test-dnsname_cc.Po \
./$(DEPDIR)/test-dnsparser_hh.Po \
@@ -492,6 +501,7 @@ am__depfiles_remade = ./$(DEPDIR)/arguments.Po ./$(DEPDIR)/base32.Po \
./$(DEPDIR)/test-rpzloader_cc.Po \
./$(DEPDIR)/test-secpoll_cc.Po ./$(DEPDIR)/test-signers.Po \
./$(DEPDIR)/test-syncres_cc.Po ./$(DEPDIR)/test-syncres_cc1.Po \
./$(DEPDIR)/test-syncres_cc10.Po \
./$(DEPDIR)/test-syncres_cc2.Po \
./$(DEPDIR)/test-syncres_cc3.Po \
./$(DEPDIR)/test-syncres_cc4.Po \
@@ -1058,10 +1068,9 @@ AM_LDFLAGS = \

ACLOCAL_AMFLAGS = -I m4
BUILT_SOURCES = htmlfiles.h dnslabeltext.cc $(am__append_5) \
$(am__append_28) $(am__append_30)
$(am__append_27) $(am__append_29)
CLEANFILES = htmlfiles.h dnsmessage.pb.cc dnsmessage.pb.h dnstap.pb.cc \
dnstap.pb.h recursor.conf-dist $(am__append_6) \
$(am__append_36)
dnstap.pb.h recursor.conf-dist lua.hpp $(am__append_35)
SUBDIRS = ext
EXTRA_DIST = \
contrib/* \
@@ -1107,54 +1116,59 @@ pdns_recursor_SOURCES = arguments.cc ascii.hh base32.cc base32.hh \
mtasker_context.hh namespaces.hh negcache.hh negcache.cc \
nsecrecords.cc opensslsigners.cc opensslsigners.hh \
packetcache.hh pdns_recursor.cc pdnsexception.hh \
pollmplexer.cc protobuf.cc protobuf.hh pubsuffix.hh \
pubsuffix.cc pubsuffixloader.cc qtype.hh qtype.cc \
rcpgenerator.cc rcpgenerator.hh rec-carbon.cc rec-lua-conf.hh \
rec-lua-conf.cc rec-protobuf.cc rec-protobuf.hh rec-snmp.hh \
rec-snmp.cc rec_channel.cc rec_channel.hh rec_metrics.hh \
rec_channel_rec.cc recpacketcache.cc recpacketcache.hh \
recursor_cache.cc recursor_cache.hh reczones.cc \
remote_logger.cc remote_logger.hh resolver.hh resolver.cc \
resolve-context.hh responsestats.hh responsestats.cc \
root-addresses.hh root-dnssec.hh rpzloader.cc rpzloader.hh \
secpoll-recursor.cc secpoll-recursor.hh secpoll.cc secpoll.hh \
sholder.hh sillyrecords.cc snmp-agent.hh snmp-agent.cc \
sortlist.cc sortlist.hh sstuff.hh stable-bloom.hh syncres.cc \
syncres.hh threadname.hh threadname.cc tsigverifier.cc \
tsigverifier.hh ueberbackend.hh unix_utility.cc utility.hh \
uuid-utils.hh uuid-utils.cc validate.cc validate.hh \
validate-recursor.cc validate-recursor.hh version.cc \
version.hh webserver.cc webserver.hh ws-api.cc ws-api.hh \
ws-recursor.cc ws-recursor.hh xpf.cc xpf.hh zoneparser-tng.cc \
zoneparser-tng.hh $(am__append_7) $(am__append_13) \
$(am__append_17) $(am__append_19) $(am__append_22) \
$(am__append_24) $(am__append_26) $(am__append_34)
pollmplexer.cc protobuf.cc protobuf.hh proxy-protocol.cc \
proxy-protocol.hh pubsuffix.hh pubsuffix.cc pubsuffixloader.cc \
qtype.hh qtype.cc query-local-address.hh \
query-local-address.cc rcpgenerator.cc rcpgenerator.hh \
rec-carbon.cc rec-lua-conf.hh rec-lua-conf.cc rec-protobuf.cc \
rec-protobuf.hh rec-snmp.hh rec-snmp.cc rec_channel.cc \
rec_channel.hh rec_metrics.hh rec_channel_rec.cc \
recpacketcache.cc recpacketcache.hh recursor_cache.cc \
recursor_cache.hh reczones.cc remote_logger.cc \
remote_logger.hh resolver.hh resolver.cc axfr-retriever.hh \
axfr-retriever.cc resolve-context.hh responsestats.hh \
responsestats.cc root-addresses.hh root-dnssec.hh rpzloader.cc \
rpzloader.hh secpoll-recursor.cc secpoll-recursor.hh \
secpoll.cc secpoll.hh sholder.hh shuffle.cc shuffle.hh \
sillyrecords.cc snmp-agent.hh snmp-agent.cc sortlist.cc \
sortlist.hh sstuff.hh stable-bloom.hh syncres.cc syncres.hh \
threadname.hh threadname.cc tsigverifier.cc tsigverifier.hh \
ueberbackend.hh unix_utility.cc utility.hh uuid-utils.hh \
uuid-utils.cc validate.cc validate.hh validate-recursor.cc \
validate-recursor.hh version.cc version.hh webserver.cc \
webserver.hh ws-api.cc ws-api.hh ws-recursor.cc ws-recursor.hh \
xpf.cc xpf.hh zoneparser-tng.cc zoneparser-tng.hh \
$(am__append_6) $(am__append_12) $(am__append_16) \
$(am__append_18) $(am__append_21) $(am__append_23) \
$(am__append_25) $(am__append_33)
@HAVE_LUA_HPP_FALSE@nodist_pdns_recursor_SOURCES = lua.hpp \
@HAVE_LUA_HPP_FALSE@ $(am__append_31)
@HAVE_LUA_HPP_FALSE@ $(am__append_30)
@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@nodist_pdns_recursor_SOURCES = \
@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@ dnsmessage.pb.cc \
@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@ dnsmessage.pb.h \
@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@ $(am__append_31)
@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@ $(am__append_30)
pdns_recursor_LDADD = $(YAHTTP_LIBS) $(JSON11_LIBS) $(LIBCRYPTO_LIBS) \
$(BOOST_CONTEXT_LIBS) $(NET_SNMP_LIBS) $(SYSTEMD_LIBS) \
$(RT_LIBS) $(BOOST_SYSTEM_LIBS) $(PROBDS_LIBS) $(LIBCAP_LIBS) \
$(am__append_8) $(am__append_14) $(am__append_18) \
$(am__append_21) $(am__append_29) $(am__append_35)
$(am__append_7) $(am__append_13) $(am__append_17) \
$(am__append_20) $(am__append_28) $(am__append_34)
pdns_recursor_LDFLAGS = $(AM_LDFLAGS) $(LIBCRYPTO_LDFLAGS) \
$(BOOST_CONTEXT_LDFLAGS) $(BOOST_SYSTEM_LDFLAGS) \
$(am__append_9) $(am__append_20)
testrunner_SOURCES = arguments.cc base32.cc base64.cc base64.hh \
circular_buffer.hh dns.cc dns.hh dns_random.cc dns_random.hh \
dnslabeltext.cc dnsname.cc dnsname.hh dnsparser.hh \
dnsparser.cc dnsrecords.cc dnssecinfra.cc dnsseckeeper.hh \
dnswriter.cc dnswriter.hh ednscookies.cc ednscookies.hh \
ednsoptions.cc ednsoptions.hh ednssubnet.cc ednssubnet.hh \
filterpo.cc filterpo.hh gettime.cc gettime.hh gss_context.cc \
gss_context.hh iputils.cc iputils.hh ixfr.cc ixfr.hh logger.cc \
logger.hh misc.cc misc.hh mtasker_context.cc negcache.hh \
negcache.cc namespaces.hh nsecrecords.cc pdnsexception.hh \
opensslsigners.cc opensslsigners.hh pollmplexer.cc protobuf.cc \
protobuf.hh qtype.cc qtype.hh rcpgenerator.cc rec-protobuf.cc \
$(am__append_8) $(am__append_19)
testrunner_SOURCES = arguments.cc axfr-retriever.hh axfr-retriever.cc \
base32.cc base64.cc base64.hh circular_buffer.hh dns.cc dns.hh \
dns_random.cc dns_random.hh dnslabeltext.cc dnsname.cc \
dnsname.hh dnsparser.hh dnsparser.cc dnsrecords.cc \
dnssecinfra.cc dnsseckeeper.hh dnswriter.cc dnswriter.hh \
ednscookies.cc ednscookies.hh ednsoptions.cc ednsoptions.hh \
ednssubnet.cc ednssubnet.hh filterpo.cc filterpo.hh gettime.cc \
gettime.hh gss_context.cc gss_context.hh iputils.cc iputils.hh \
ixfr.cc ixfr.hh logger.cc logger.hh misc.cc misc.hh \
mtasker_context.cc negcache.hh negcache.cc namespaces.hh \
nsecrecords.cc pdnsexception.hh opensslsigners.cc \
opensslsigners.hh pollmplexer.cc protobuf.cc protobuf.hh \
qtype.cc qtype.hh query-local-address.hh \
query-local-address.cc rcpgenerator.cc rec-protobuf.cc \
rec-protobuf.hh recpacketcache.cc recpacketcache.hh \
recursor_cache.cc recursor_cache.hh responsestats.cc \
rpzloader.cc rpzloader.hh resolver.hh resolver.cc \
@@ -1172,23 +1186,24 @@ testrunner_SOURCES = arguments.cc base32.cc base64.cc base64.hh \
test-syncres_cc.cc test-syncres_cc1.cc test-syncres_cc2.cc \
test-syncres_cc3.cc test-syncres_cc4.cc test-syncres_cc5.cc \
test-syncres_cc6.cc test-syncres_cc7.cc test-syncres_cc8.cc \
test-syncres_cc9.cc test-tsig.cc test-xpf_cc.cc testrunner.cc \
threadname.hh threadname.cc tsigverifier.cc tsigverifier.hh \
unix_utility.cc validate.cc validate.hh validate-recursor.cc \
validate-recursor.hh xpf.cc xpf.hh zoneparser-tng.cc \
zoneparser-tng.hh $(am__append_10) $(am__append_15) \
$(am__append_23) $(am__append_25) $(am__append_27)
test-syncres_cc9.cc test-syncres_cc10.cc test-tsig.cc \
test-xpf_cc.cc testrunner.cc threadname.hh threadname.cc \
tsigverifier.cc tsigverifier.hh unix_utility.cc validate.cc \
validate.hh validate-recursor.cc validate-recursor.hh xpf.cc \
xpf.hh zoneparser-tng.cc zoneparser-tng.hh $(am__append_9) \
$(am__append_14) $(am__append_22) $(am__append_24) \
$(am__append_26)
testrunner_LDFLAGS = $(AM_LDFLAGS) $(BOOST_CONTEXT_LDFLAGS) \
$(BOOST_UNIT_TEST_FRAMEWORK_LDFLAGS) $(LIBCRYPTO_LDFLAGS) \
$(BOOST_SYSTEM_LDFLAGS) $(am__append_12)
$(BOOST_SYSTEM_LDFLAGS) $(am__append_11)
testrunner_LDADD = $(BOOST_CONTEXT_LIBS) \
$(BOOST_UNIT_TEST_FRAMEWORK_LIBS) $(LIBCRYPTO_LIBS) $(RT_LIBS) \
$(BOOST_SYSTEM_LIBS) $(PROBDS_LIBS) $(LIBCAP_LIBS) \
$(am__append_11) $(am__append_16) $(am__append_33)
$(am__append_10) $(am__append_15) $(am__append_32)
@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@nodist_testrunner_SOURCES = \
@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@ dnsmessage.pb.cc \
@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@ dnsmessage.pb.h \
@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@ $(am__append_32)
@HAVE_PROTOBUF_TRUE@@HAVE_PROTOC_TRUE@ $(am__append_31)
rec_control_SOURCES = \
arguments.cc arguments.hh \
dnsname.hh dnsname.cc \
@@ -1394,6 +1409,7 @@ distclean-compile:
-rm -f *.tab.c

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arguments.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/axfr-retriever.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base32.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capabilities.Po@am__quote@ # am--include-marker
@@ -1437,9 +1453,11 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pollmplexer.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/portsmplexer.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protobuf.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proxy-protocol.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pubsuffix.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pubsuffixloader.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qtype.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/query-local-address.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rcpgenerator.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rec-carbon.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rec-lua-conf.Po@am__quote@ # am--include-marker
@@ -1457,6 +1475,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rpzloader.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secpoll-recursor.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secpoll.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shuffle.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sillyrecords.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snmp-agent.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sodiumsigners.Po@am__quote@ # am--include-marker
@@ -1488,6 +1507,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-signers.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-syncres_cc.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-syncres_cc1.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-syncres_cc10.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-syncres_cc2.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-syncres_cc3.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-syncres_cc4.Po@am__quote@ # am--include-marker
@@ -2160,6 +2180,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool \
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f ./$(DEPDIR)/arguments.Po
-rm -f ./$(DEPDIR)/axfr-retriever.Po
-rm -f ./$(DEPDIR)/base32.Po
-rm -f ./$(DEPDIR)/base64.Po
-rm -f ./$(DEPDIR)/capabilities.Po
@@ -2203,9 +2224,11 @@ distclean: distclean-recursive
-rm -f ./$(DEPDIR)/pollmplexer.Po
-rm -f ./$(DEPDIR)/portsmplexer.Po
-rm -f ./$(DEPDIR)/protobuf.Po
-rm -f ./$(DEPDIR)/proxy-protocol.Po
-rm -f ./$(DEPDIR)/pubsuffix.Po
-rm -f ./$(DEPDIR)/pubsuffixloader.Po
-rm -f ./$(DEPDIR)/qtype.Po
-rm -f ./$(DEPDIR)/query-local-address.Po
-rm -f ./$(DEPDIR)/rcpgenerator.Po
-rm -f ./$(DEPDIR)/rec-carbon.Po
-rm -f ./$(DEPDIR)/rec-lua-conf.Po
@@ -2223,6 +2246,7 @@ distclean: distclean-recursive
-rm -f ./$(DEPDIR)/rpzloader.Po
-rm -f ./$(DEPDIR)/secpoll-recursor.Po
-rm -f ./$(DEPDIR)/secpoll.Po
-rm -f ./$(DEPDIR)/shuffle.Po
-rm -f ./$(DEPDIR)/sillyrecords.Po
-rm -f ./$(DEPDIR)/snmp-agent.Po
-rm -f ./$(DEPDIR)/sodiumsigners.Po
@@ -2254,6 +2278,7 @@ distclean: distclean-recursive
-rm -f ./$(DEPDIR)/test-signers.Po
-rm -f ./$(DEPDIR)/test-syncres_cc.Po
-rm -f ./$(DEPDIR)/test-syncres_cc1.Po
-rm -f ./$(DEPDIR)/test-syncres_cc10.Po
-rm -f ./$(DEPDIR)/test-syncres_cc2.Po
-rm -f ./$(DEPDIR)/test-syncres_cc3.Po
-rm -f ./$(DEPDIR)/test-syncres_cc4.Po
@@ -2326,6 +2351,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f ./$(DEPDIR)/arguments.Po
-rm -f ./$(DEPDIR)/axfr-retriever.Po
-rm -f ./$(DEPDIR)/base32.Po
-rm -f ./$(DEPDIR)/base64.Po
-rm -f ./$(DEPDIR)/capabilities.Po
@@ -2369,9 +2395,11 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/pollmplexer.Po
-rm -f ./$(DEPDIR)/portsmplexer.Po
-rm -f ./$(DEPDIR)/protobuf.Po
-rm -f ./$(DEPDIR)/proxy-protocol.Po
-rm -f ./$(DEPDIR)/pubsuffix.Po
-rm -f ./$(DEPDIR)/pubsuffixloader.Po
-rm -f ./$(DEPDIR)/qtype.Po
-rm -f ./$(DEPDIR)/query-local-address.Po
-rm -f ./$(DEPDIR)/rcpgenerator.Po
-rm -f ./$(DEPDIR)/rec-carbon.Po
-rm -f ./$(DEPDIR)/rec-lua-conf.Po
@@ -2389,6 +2417,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/rpzloader.Po
-rm -f ./$(DEPDIR)/secpoll-recursor.Po
-rm -f ./$(DEPDIR)/secpoll.Po
-rm -f ./$(DEPDIR)/shuffle.Po
-rm -f ./$(DEPDIR)/sillyrecords.Po
-rm -f ./$(DEPDIR)/snmp-agent.Po
-rm -f ./$(DEPDIR)/sodiumsigners.Po
@@ -2420,6 +2449,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/test-signers.Po
-rm -f ./$(DEPDIR)/test-syncres_cc.Po
-rm -f ./$(DEPDIR)/test-syncres_cc1.Po
-rm -f ./$(DEPDIR)/test-syncres_cc10.Po
-rm -f ./$(DEPDIR)/test-syncres_cc2.Po
-rm -f ./$(DEPDIR)/test-syncres_cc3.Po
-rm -f ./$(DEPDIR)/test-syncres_cc4.Po


+ 32
- 2
RECURSOR-MIB.txt View File

@@ -15,7 +15,7 @@ IMPORTS
FROM SNMPv2-CONF;

rec MODULE-IDENTITY
LAST-UPDATED "201911140000Z"
LAST-UPDATED "202002170000Z"
ORGANIZATION "PowerDNS BV"
CONTACT-INFO "support@powerdns.com"
DESCRIPTION
@@ -30,6 +30,9 @@ rec MODULE-IDENTITY
REVISION "201911140000Z"
DESCRIPTION "Added qnameMinFallbackSuccess stats."

REVISION "202002170000Z"
DESCRIPTION "Added proxyProtocolInvalid metric."

::= { powerdns 2 }

powerdns OBJECT IDENTIFIER ::= { enterprises 43315 }
@@ -836,6 +839,30 @@ qnameMinFallbackSuccess OBJECT-TYPE
"Number of successful queries due to fallback mechanism within 'qname-minimization' setting"
::= { stats 100 }

proxyProtocolInvalid OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Number of invalid proxy protocol headers received"
::= { stats 101 }

recordCacheContended OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Number of contended record cache lock acquisitions"
::= { stats 102 }

recordCacheAcquired OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Number of record cache lock acquisitions"
::= { stats 103 }

---
--- Traps / Notifications
---
@@ -979,7 +1006,10 @@ recGroup OBJECT-GROUP
specialMemoryUsage,
rebalancedQueries,
trapReason,
qnameMinFallbackSuccess
qnameMinFallbackSuccess,
proxyProtocolInvalid,
recordCacheContended,
recordCacheAcquired
}
STATUS current
DESCRIPTION "Objects conformance group for PowerDNS Recursor"


+ 45
- 14
arguments.cc View File

@@ -50,6 +50,19 @@ string & ArgvMap::set(const string &var)
return params[var];
}

void ArgvMap::setDefault(const string &var, const string &value)
{
if(! defaultmap.count(var))
defaultmap.insert(pair<string, string>(var, value));
}

void ArgvMap::setDefaults()
{
for(map<string,string>::const_iterator i=params.begin();i!=params.end();++i)
if(! defaultmap.count(i->first))
defaultmap.insert(*i);
}

bool ArgvMap::mustDo(const string &var)
{
return ((*this)[var]!="no") && ((*this)[var]!="off");
@@ -141,29 +154,47 @@ string ArgvMap::helpstring(string prefix)
return help;
}

string ArgvMap::configstring(bool current)
string ArgvMap::configstring(bool running, bool full)
{
string help;

if (current)
help="# Autogenerated configuration file based on running instance\n";
if (running)
help="# Autogenerated configuration file based on running instance ("+nowTime()+")\n\n";
else
help="# Autogenerated configuration file template\n";
help="# Autogenerated configuration file template\n\n";
for(const auto& i: helpmap) {
if(d_typeMap[i.first]=="Command")
continue;

help+="#################################\n";
help+="# ";
help+=i.first;
help+="\t";
help+=i.second;
help+="\n#\n";
if (current) {
help+=i.first+"="+params[i.first]+"\n\n";
if (! defaultmap.count(i.first)) {
throw ArgException(string("Default for parameter '")+i.first+"' not set");
}

if (!running || full) {
help+="#################################\n";
help+="# ";
help+=i.first;
help+="\t";
help+=i.second;
help+="\n#\n";
} else {
if (defaultmap[i.first] == params[i.first]) {
continue;
}
}

if (! running || defaultmap[i.first] == params[i.first]) {
help+="# ";
}

if (running) {
help+=i.first+"="+params[i.first]+"\n";
if (full) {
help+="\n";
}
} else {
help+="# "+i.first+"="+params[i.first]+"\n\n";
help+=i.first+"="+defaultmap[i.first]+"\n\n";
}
}
return help;


+ 5
- 6
arguments.hh View File

@@ -19,9 +19,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef ARGUMENTS_HH
#define ARGUMENTS_HH

#pragma once
#include <map>
#include <set>
#include <string>
@@ -106,9 +104,11 @@ public:
void setCmd(const string &, const string &); //!< Add a command flag
string &setSwitch(const string &, const string &); //!< Add a switch flag
string helpstring(string prefix=""); //!< generates the --help
string configstring(bool current=false); //!< generates the --mkconfig
string configstring(bool current, bool full); //!< generates the --config
bool contains(const string &var, const string &val);
bool isEmpty(const string &var); //!< checks if variable has value
void setDefault(const string &var, const string &value);
void setDefaults();

vector<string>list();
string getHelp(const string &item);
@@ -123,11 +123,10 @@ private:
typedef map<string,string> params_t;
params_t params;
map<string,string> helpmap;
map<string,string> defaultmap;
map<string,string> d_typeMap;
vector<string> d_cmds;
std::set<string> d_cleared;
};

extern ArgvMap &arg();

#endif /* ARGUMENTS_HH */

+ 248
- 0
axfr-retriever.cc View File

@@ -0,0 +1,248 @@
/*
* This file is part of PowerDNS or dnsdist.
* Copyright -- PowerDNS.COM B.V. and its contributors
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* In addition, for the avoidance of any doubt, permission is granted to
* link this program with OpenSSL and to (re)distribute the binaries
* produced as the result of such linking.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "axfr-retriever.hh"
#include "arguments.hh"
#include "dns_random.hh"
#include "utility.hh"
#include "resolver.hh"
#include "query-local-address.hh"

using pdns::resolver::parseResult;

AXFRRetriever::AXFRRetriever(const ComboAddress& remote,
const DNSName& domain,
const TSIGTriplet& tt,
const ComboAddress* laddr,
size_t maxReceivedBytes,
uint16_t timeout)
: d_tsigVerifier(tt, remote, d_trc), d_receivedBytes(0), d_maxReceivedBytes(maxReceivedBytes)
{
ComboAddress local;
if (laddr != nullptr) {
local = ComboAddress(*laddr);
} else {
if (!pdns::isQueryLocalAddressFamilyEnabled(remote.sin4.sin_family)) {
throw ResolverException("Unable to determine source address for AXFR request to " + remote.toStringWithPort() + " for " + domain.toLogString() + ". Address family is not configured for outgoing queries");
}
local = pdns::getQueryLocalAddress(remote.sin4.sin_family, 0);
}
d_sock = -1;
try {
d_sock = makeQuerySocket(local, false); // make a TCP socket
if (d_sock < 0)
throw ResolverException("Error creating socket for AXFR request to "+d_remote.toStringWithPort());
d_buf = shared_array<char>(new char[65536]);
d_remote = remote; // mostly for error reporting
this->connect(timeout);
d_soacount = 0;
vector<uint8_t> packet;
DNSPacketWriter pw(packet, domain, QType::AXFR);
pw.getHeader()->id = dns_random_uint16();
if(!tt.name.empty()) {
if (tt.algo == DNSName("hmac-md5"))
d_trc.d_algoName = tt.algo + DNSName("sig-alg.reg.int");
else
d_trc.d_algoName = tt.algo;
d_trc.d_time = time(0);
d_trc.d_fudge = 300;
d_trc.d_origID=ntohs(pw.getHeader()->id);
d_trc.d_eRcode=0;
addTSIG(pw, d_trc, tt.name, tt.secret, "", false);
}
uint16_t replen=htons(packet.size());
Utility::iovec iov[2];
iov[0].iov_base=reinterpret_cast<char*>(&replen);
iov[0].iov_len=2;
iov[1].iov_base=packet.data();
iov[1].iov_len=packet.size();
int ret=Utility::writev(d_sock, iov, 2);
if(ret < 0)
throw ResolverException("Error sending question to "+d_remote.toStringWithPort()+": "+stringerror());
if(ret != (int)(2+packet.size())) {
throw ResolverException("Partial write on AXFR request to "+d_remote.toStringWithPort());
}
int res = waitForData(d_sock, timeout, 0);
if(!res)
throw ResolverException("Timeout waiting for answer from "+d_remote.toStringWithPort()+" during AXFR");
if(res<0)
throw ResolverException("Error waiting for answer from "+d_remote.toStringWithPort()+": "+stringerror());
}
catch(...) {
if(d_sock >= 0)
close(d_sock);
d_sock = -1;
throw;
}
}

AXFRRetriever::~AXFRRetriever()
{
close(d_sock);
}



int AXFRRetriever::getChunk(Resolver::res_t &res, vector<DNSRecord>* records, uint16_t timeout) // Implementation is making sure RFC2845 4.4 is followed.
{
if(d_soacount > 1)
return false;

// d_sock is connected and is about to spit out a packet
int len=getLength(timeout);
if(len<0)
throw ResolverException("EOF trying to read axfr chunk from remote TCP client");

if (d_maxReceivedBytes > 0 && (d_maxReceivedBytes - d_receivedBytes) < (size_t) len)
throw ResolverException("Reached the maximum number of received bytes during AXFR");

timeoutReadn(len, timeout);

d_receivedBytes += (uint16_t) len;

MOADNSParser mdp(false, d_buf.get(), len);

int err = mdp.d_header.rcode;

if(err) {
throw ResolverException("AXFR chunk error: " + RCode::to_s(err));
}

try {
d_tsigVerifier.check(std::string(d_buf.get(), len), mdp);
}
catch(const std::runtime_error& re) {
throw ResolverException(re.what());
}

if(!records) {
err = parseResult(mdp, DNSName(), 0, 0, &res);

if (!err) {
for(const auto& answer : mdp.d_answers)
if (answer.first.d_type == QType::SOA)
d_soacount++;
}
}
else {
records->clear();
records->reserve(mdp.d_answers.size());

for(auto& r: mdp.d_answers) {
if (r.first.d_type == QType::SOA) {
d_soacount++;
}

records->push_back(std::move(r.first));
}
}

return true;
}

void AXFRRetriever::timeoutReadn(uint16_t bytes, uint16_t timeoutsec)
{
time_t start=time(nullptr);
int n=0;
int numread;
while(n<bytes) {
int res=waitForData(d_sock, timeoutsec-(time(nullptr)-start));
if(res<0)
throw ResolverException("Reading data from remote nameserver over TCP: "+stringerror());
if(!res)
throw ResolverException("Timeout while reading data from remote nameserver over TCP");

numread=recv(d_sock, d_buf.get()+n, bytes-n, 0);
if(numread<0)
throw ResolverException("Reading data from remote nameserver over TCP: "+stringerror());
if(numread==0)
throw ResolverException("Remote nameserver closed TCP connection");
n+=numread;
}
}

void AXFRRetriever::connect(uint16_t timeout)
{
setNonBlocking( d_sock );

int err;

if((err=::connect(d_sock,(struct sockaddr*)&d_remote, d_remote.getSocklen()))<0 && errno!=EINPROGRESS) {
try {
closesocket(d_sock);
}
catch(const PDNSException& e) {
d_sock=-1;
throw ResolverException("Error closing AXFR socket after connect() failed: "+e.reason);
}

throw ResolverException("connect: "+stringerror());
}

if(!err)
goto done;

err=waitForRWData(d_sock, false, timeout, 0); // wait for writeability
if(!err) {
try {
closesocket(d_sock); // timeout
}
catch(const PDNSException& e) {
d_sock=-1;
throw ResolverException("Error closing AXFR socket after timeout: "+e.reason);
}

d_sock=-1;
errno=ETIMEDOUT;
throw ResolverException("Timeout connecting to server");
}
else if(err < 0) {
throw ResolverException("Error connecting: "+stringerror());
}
else {
Utility::socklen_t len=sizeof(err);
if(getsockopt(d_sock, SOL_SOCKET,SO_ERROR,(char *)&err,&len)<0)
throw ResolverException("Error connecting: "+stringerror()); // Solaris

if(err)
throw ResolverException("Error connecting: "+string(strerror(err)));
}
done:
setBlocking( d_sock );
// d_sock now connected
}

int AXFRRetriever::getLength(uint16_t timeout)
{
timeoutReadn(2, timeout);
return (unsigned char)d_buf[0]*256+(unsigned char)d_buf[1];
}


+ 56
- 0
axfr-retriever.hh View File

@@ -0,0 +1,56 @@
/*
* This file is part of PowerDNS or dnsdist.
* Copyright -- PowerDNS.COM B.V. and its contributors
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* In addition, for the avoidance of any doubt, permission is granted to
* link this program with OpenSSL and to (re)distribute the binaries
* produced as the result of such linking.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#pragma once
#include <boost/utility.hpp>

#include "iputils.hh"
#include "dnsname.hh"
#include "resolver.hh"

class AXFRRetriever : public boost::noncopyable
{
public:
AXFRRetriever(const ComboAddress& remote,
const DNSName& zone,
const TSIGTriplet& tt = TSIGTriplet(),
const ComboAddress* laddr = NULL,
size_t maxReceivedBytes=0,
uint16_t timeout=10);
~AXFRRetriever();
int getChunk(Resolver::res_t &res, vector<DNSRecord>* records=0, uint16_t timeout=10);

private:
void connect(uint16_t timeout);
int getLength(uint16_t timeout);
void timeoutReadn(uint16_t bytes, uint16_t timeoutsec=10);

shared_array<char> d_buf;
string d_domain;
int d_sock;
int d_soacount;
ComboAddress d_remote;
TSIGTCPVerifier d_tsigVerifier;

size_t d_receivedBytes;
size_t d_maxReceivedBytes;
TSIGRecordContent d_trc;
};

+ 1
- 1
base32.cc View File

@@ -33,7 +33,7 @@

/* based on freebsd:src/contrib/opie/libopie/btoe.c extract: get bit ranges from a char* */
/* NOTE: length should not exceed 8; all callers inside PowerDNS only pass length=5 though */
unsigned char extract_bits(const char *s, int start, int length)
static unsigned char extract_bits(const char *s, int start, int length)
{
uint16_t x;
unsigned char cl, cc;


+ 1
- 4
base32.hh View File

@@ -19,11 +19,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef PDNS_BASE32_HH
#define PDNS_BASE32_HH
#pragma once
#include <string>

std::string toBase32Hex(const std::string& input);
std::string fromBase32Hex(const std::string& input);

#endif

+ 1
- 5
base64.hh View File

@@ -19,12 +19,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef PDNS_BASE64_HH
#define PDNS_BASE64_HH

#pragma once
#include <string>

int B64Decode(const std::string& src, std::string& dst);
std::string Base64Encode (const std::string& src);

#endif

+ 91
- 45
cachecleaner.hh View File

@@ -21,71 +21,56 @@
*/
#pragma once

#include <mutex>
#include "lock.hh"

// this function can clean any cache that has a getTTD() method on its entries, a preRemoval() method and a 'sequence' index as its second index
// the ritual is that the oldest entries are in *front* of the sequence collection, so on a hit, move an item to the end
// on a miss, move it to the beginning
template <typename S, typename C, typename T> void pruneCollection(C& container, T& collection, unsigned int maxCached, unsigned int scanFraction=1000)
template <typename S, typename C, typename T> void pruneCollection(C& container, T& collection, size_t maxCached, size_t scanFraction = 1000)
{
time_t now=time(0);
unsigned int toTrim=0;
unsigned int cacheSize=collection.size();
const time_t now = time(0);
size_t toTrim = 0;
const size_t cacheSize = collection.size();

if(cacheSize > maxCached) {
if (cacheSize > maxCached) {
toTrim = cacheSize - maxCached;
}

// cout<<"Need to trim "<<toTrim<<" from cache to meet target!\n";

typedef typename T::template index<S>::type sequence_t;
sequence_t& sidx=collection.template get<S>();

unsigned int tried=0, lookAt, erased=0;
auto& sidx = collection.template get<S>();

// two modes - if toTrim is 0, just look through 1/scanFraction of all records
// and nuke everything that is expired
// otherwise, scan first 5*toTrim records, and stop once we've nuked enough
if(toTrim)
lookAt=5*toTrim;
else
lookAt=cacheSize/scanFraction;
const size_t lookAt = toTrim ? 5 * toTrim : cacheSize / scanFraction;
size_t tried = 0, erased = 0;

typename sequence_t::iterator iter=sidx.begin(), eiter;
for(; iter != sidx.end() && tried < lookAt ; ++tried) {
if(iter->getTTD() < now) {
for (auto iter = sidx.begin(); iter != sidx.end() && tried < lookAt ; ++tried) {
if (iter->getTTD() < now) {
container.preRemoval(*iter);
sidx.erase(iter++);
iter = sidx.erase(iter);
erased++;
}
else
else {
++iter;
}

if(toTrim && erased >= toTrim)
if (toTrim && erased >= toTrim) {
break;
}
}

//cout<<"erased "<<erased<<" records based on ttd\n";
if(erased >= toTrim) // done
if (erased >= toTrim) { // done
return;
}

toTrim -= erased;

//if(toTrim)
// cout<<"Still have "<<toTrim - erased<<" entries left to erase to meet target\n";

eiter=iter=sidx.begin();
std::advance(eiter, toTrim);
// just lob it off from the beginning
for (auto i = iter; ; ) {
if (i == eiter) {
break;
}

container.preRemoval(*i);
sidx.erase(i++);
auto iter = sidx.begin();
for (size_t i = 0; i < toTrim && iter != sidx.end(); i++) {
container.preRemoval(*iter);
iter = sidx.erase(iter);
}
}

@@ -111,7 +96,33 @@ template <typename S, typename T> void moveCacheItemToBack(T& collection, typena
moveCacheItemToFrontOrBack<S>(collection, iter, false);
}

template <typename S, typename T> uint64_t pruneLockedCollectionsVector(vector<T>& maps, uint64_t maxCached, uint64_t cacheSize)
template <typename S, typename T> uint64_t pruneLockedCollectionsVector(vector<T>& maps)
{
uint64_t totErased = 0;
time_t now = time(nullptr);

for(auto& mc : maps) {
WriteLock wl(&mc.d_mut);

uint64_t lookAt = (mc.d_map.size() + 9) / 10; // Look at 10% of this shard
uint64_t erased = 0;

auto& sidx = boost::multi_index::get<S>(mc.d_map);
for(auto i = sidx.begin(); i != sidx.end() && lookAt > 0; lookAt--) {
if(i->ttd < now) {
i = sidx.erase(i);
erased++;
} else {
++i;
}
}
totErased += erased;
}

return totErased;
}

template <typename S, typename C, typename T> uint64_t pruneMutexCollectionsVector(C& container, vector<T>& maps, uint64_t maxCached, uint64_t cacheSize)
{
time_t now = time(nullptr);
uint64_t totErased = 0;
@@ -120,34 +131,69 @@ template <typename S, typename T> uint64_t pruneLockedCollectionsVector(vector<T

// two modes - if toTrim is 0, just look through 10% of the cache and nuke everything that is expired
// otherwise, scan first 5*toTrim records, and stop once we've nuked enough
if (maxCached && cacheSize > maxCached) {
if (cacheSize > maxCached) {
toTrim = cacheSize - maxCached;
lookAt = 5 * toTrim;
} else {
lookAt = cacheSize / 10;
}

for(auto& mc : maps) {
WriteLock wl(&mc.d_mut);
uint64_t maps_size = maps.size();
if (maps_size == 0)
return 0;

for (auto& mc : maps) {
const typename C::lock l(mc);
mc.d_cachecachevalid = false;
auto& sidx = boost::multi_index::get<S>(mc.d_map);
uint64_t erased = 0, lookedAt = 0;
for(auto i = sidx.begin(); i != sidx.end(); lookedAt++) {
if(i->ttd < now) {
for (auto i = sidx.begin(); i != sidx.end(); lookedAt++) {
if (i->getTTD() < now) {
container.preRemoval(*i);
i = sidx.erase(i);
erased++;
mc.d_entriesCount--;
} else {
++i;
}

if(toTrim && erased > toTrim / maps.size())
if (toTrim && erased >= toTrim / maps_size)
break;

if(lookedAt > lookAt / maps.size())
if (lookedAt > lookAt / maps_size)
break;
}
totErased += erased;
if (toTrim && totErased >= toTrim)
break;
}

if (totErased >= toTrim) { // done
return totErased;
}

toTrim -= totErased;

while (true) {
size_t pershard = toTrim / maps_size + 1;
for (auto& mc : maps) {
const typename C::lock l(mc);
mc.d_cachecachevalid = false;
auto& sidx = boost::multi_index::get<S>(mc.d_map);
size_t removed = 0;
for (auto i = sidx.begin(); i != sidx.end() && removed < pershard; removed++) {
container.preRemoval(*i);
i = sidx.erase(i);
mc.d_entriesCount--;
totErased++;
toTrim--;
if (toTrim == 0) {
return totErased;
}
}
}
}
// Not reached
return totErased;
}



+ 1
- 5
comment.hh View File

@@ -19,9 +19,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef PDNS_COMMENT_HH
#define PDNS_COMMENT_HH

#pragma once
#include "utility.hh"
#include "qtype.hh"
#include <sys/types.h>
@@ -41,5 +39,3 @@ public:
int domain_id;
QType qtype; //!< qtype of the associated RRset, ie A, CNAME, MX etc
};

#endif /* PDNS_COMMENT_HH */

+ 15
- 0
config.h.in View File

@@ -61,6 +61,9 @@
/* Define to 1 if you have the `crypto_box_easy_afternm' function. */
#undef HAVE_CRYPTO_BOX_EASY_AFTERNM

/* Define to 1 if you have the `CRYPTO_memcmp' function. */
#undef HAVE_CRYPTO_MEMCMP

/* define if the compiler supports basic C++11 syntax */
#undef HAVE_CXX11

@@ -87,6 +90,12 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H

/* Define to 1 if you have the `EVP_MD_CTX_free' function. */
#undef HAVE_EVP_MD_CTX_FREE

/* Define to 1 if you have the `EVP_MD_CTX_new' function. */
#undef HAVE_EVP_MD_CTX_NEW

/* Define if ASAN fiber annotation interface is available. */
#undef HAVE_FIBER_SANITIZER

@@ -147,6 +156,9 @@
/* Define if using Net SNMP. */
#undef HAVE_NET_SNMP

/* Define to 1 if you have the `OPENSSL_init_crypto' function. */
#undef HAVE_OPENSSL_INIT_CRYPTO

/* Define if using protobuf. */
#undef HAVE_PROTOBUF

@@ -183,6 +195,9 @@
/* Define to 1 if you have the `recvmmsg' function. */
#undef HAVE_RECVMMSG

/* Define to 1 if you have the `RSA_get0_key' function. */
#undef HAVE_RSA_GET0_KEY

/* Define to 1 if you have the <sanitizer/common_interface_defs.h> header
file. */
#undef HAVE_SANITIZER_COMMON_INTERFACE_DEFS_H


+ 16
- 16
configure View File

@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for pdns-recursor 4.3.5.
# Generated by GNU Autoconf 2.69 for pdns-recursor 4.4.0.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='pdns-recursor'
PACKAGE_TARNAME='pdns-recursor'
PACKAGE_VERSION='4.3.5'
PACKAGE_STRING='pdns-recursor 4.3.5'
PACKAGE_VERSION='4.4.0'
PACKAGE_STRING='pdns-recursor 4.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

@@ -1519,7 +1519,7 @@ if test "$ac_init_help" = "long"; then
# 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-recursor 4.3.5 to adapt to many kinds of systems.
\`configure' configures pdns-recursor 4.4.0 to adapt to many kinds of systems.

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

@@ -1590,7 +1590,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of pdns-recursor 4.3.5:";;
short | recursive ) echo "Configuration of pdns-recursor 4.4.0:";;
esac
cat <<\_ACEOF

@@ -1772,7 +1772,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
pdns-recursor configure 4.3.5
pdns-recursor configure 4.4.0
generated by GNU Autoconf 2.69

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

It was created by pdns-recursor $as_me 4.3.5, which was
It was created by pdns-recursor $as_me 4.4.0, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ $0 $@
@@ -3233,7 +3233,7 @@ fi

# Define the identity of the package.
PACKAGE='pdns-recursor'
VERSION='4.3.5'
VERSION='4.4.0'


cat >>confdefs.h <<_ACEOF
@@ -3559,8 +3559,8 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac


# Add some default CFLAGS and CXXFLAGS, can be appended to using the environment variables
CFLAGS="-Wall -Wextra -Wshadow -Wno-unused-parameter -g -O2 $CFLAGS"
CXXFLAGS="-Wall -Wextra -Wshadow -Wno-unused-parameter -g -O2 $CXXFLAGS"
CFLAGS="-Wall -Wextra -Wshadow -Wno-unused-parameter -Wmissing-declarations -Wredundant-decls -g -O2 $CFLAGS"
CXXFLAGS="-std=c++11 -Wall -Wextra -Wshadow -Wno-unused-parameter -Wmissing-declarations -Wredundant-decls -g -O2 $CXXFLAGS"

pdns_configure_args="$ac_configure_args"

@@ -5542,8 +5542,10 @@ $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
ac_success=yes
fi



if test x$ac_success = xno; then
for switch in -std=gnu++11 -std=gnu++0x; do
for switch in -std=c++11 -std=c++0x; do
cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
@@ -5622,8 +5624,6 @@ $as_echo "$ac_res" >&6; }
fi
done
fi


ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -21519,7 +21519,7 @@ if ac_fn_cxx_try_link "$LINENO"; then :

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
for ac_func in RAND_bytes RAND_pseudo_bytes
for ac_func in RAND_bytes RAND_pseudo_bytes CRYPTO_memcmp OPENSSL_init_crypto EVP_MD_CTX_new EVP_MD_CTX_free RSA_get0_key
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -25391,7 +25391,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by pdns-recursor $as_me 4.3.5, which was
This file was extended by pdns-recursor $as_me 4.4.0, which was
generated by GNU Autoconf 2.69. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
@@ -25457,7 +25457,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
pdns-recursor config.status 4.3.5
pdns-recursor config.status 4.4.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"



+ 4
- 4
configure.ac View File

@@ -1,6 +1,6 @@
AC_PREREQ([2.61])

AC_INIT([pdns-recursor], [4.3.5])
AC_INIT([pdns-recursor], [4.4.0])
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])
@@ -11,8 +11,8 @@ AC_CONFIG_HEADERS([config.h])

AC_CANONICAL_HOST
# Add some default CFLAGS and CXXFLAGS, can be appended to using the environment variables
CFLAGS="-Wall -Wextra -Wshadow -Wno-unused-parameter -g -O2 $CFLAGS"
CXXFLAGS="-Wall -Wextra -Wshadow -Wno-unused-parameter -g -O2 $CXXFLAGS"
CFLAGS="-Wall -Wextra -Wshadow -Wno-unused-parameter -Wmissing-declarations -Wredundant-decls -g -O2 $CFLAGS"
CXXFLAGS="-std=c++11 -Wall -Wextra -Wshadow -Wno-unused-parameter -Wmissing-declarations -Wredundant-decls -g -O2 $CXXFLAGS"

AC_SUBST([pdns_configure_args],["$ac_configure_args"])
AC_DEFINE_UNQUOTED([PDNS_CONFIG_ARGS],
@@ -33,7 +33,7 @@ AC_DEFINE([RECURSOR], [1],
# Warn when pkg.m4 is missing
m4_pattern_forbid([^_?PKG_[A-Z_]+$], [*** pkg.m4 missing, please install pkg-config])

AX_CXX_COMPILE_STDCXX_11([ext], [mandatory])
AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
AC_PROG_LIBTOOL

PDNS_CHECK_OS


+ 1
- 1
contrib/kv-example-script.lua View File

@@ -13,7 +13,7 @@ To test, use the 'kvresp' example program provided.
--]]

function preresolve (dq)
print ("prereesolve handler called for: "..dq.remoteaddr:toString().. ", local: ".. dq.localaddr:toString()..", ".. dq.qname:toString()..", ".. dq.qtype)
print ("preresolve handler called for: "..dq.remoteaddr:toString().. ", local: ".. dq.localaddr:toString()..", ".. dq.qname:toString()..", ".. dq.qtype)
dq.followupFunction="udpQueryResponse"
dq.udpCallback="gotdomaindetails"
dq.udpQueryDest=newCA("127.0.0.1:5555")


+ 8
- 11
devpollmplexer.cc View File

@@ -114,22 +114,20 @@ void DevPollFDMultiplexer::removeFD(callbackmap_t& cbmap, int fd)

void DevPollFDMultiplexer::getAvailableFDs(std::vector<int>& fds, int timeout)
{
std::vector<struct pollfd> pollfds(d_readCallbacks.size() + d_writeCallbacks.size());
struct dvpoll dvp;
dvp.dp_nfds = d_readCallbacks.size() + d_writeCallbacks.size();
dvp.dp_fds = new pollfd[dvp.dp_nfds];
dvp.dp_fds = pollfds.data();
dvp.dp_timeout = timeout;
int ret=ioctl(d_devpollfd, DP_POLL, &dvp);

if(ret < 0 && errno!=EINTR) {
delete[] dvp.dp_fds;
throw FDMultiplexerException("/dev/poll returned error: "+stringerror());
}

for(int n=0; n < ret; ++n) {
fds.push_back(dvp.dp_fds[n].fd);
fds.push_back(pollfds.at(n).fd);
}

delete[] dvp.dp_fds;
}

int DevPollFDMultiplexer::run(struct timeval* now, int timeout)
@@ -137,39 +135,38 @@ int DevPollFDMultiplexer::run(struct timeval* now, int timeout)
if(d_inrun) {
throw FDMultiplexerException("FDMultiplexer::run() is not reentrant!\n");
}
std::vector<struct pollfd> fds(d_readCallbacks.size() + d_writeCallbacks.size());
struct dvpoll dvp;
dvp.dp_nfds = d_readCallbacks.size() + d_writeCallbacks.size();
dvp.dp_fds = new pollfd[dvp.dp_nfds];
dvp.dp_fds = fds.data();
dvp.dp_timeout = timeout;
int ret=ioctl(d_devpollfd, DP_POLL, &dvp);
int err = errno;
gettimeofday(now,0); // MANDATORY!

if(ret < 0 && err!=EINTR) {
delete[] dvp.dp_fds;
throw FDMultiplexerException("/dev/poll returned error: "+stringerror(err));
}

if(ret < 1) { // thanks AB!
delete[] dvp.dp_fds;
return 0;
}

d_inrun=true;
for(int n=0; n < ret; ++n) {
d_iter=d_readCallbacks.find(dvp.dp_fds[n].fd);
d_iter=d_readCallbacks.find(fds.at(n).fd);
if(d_iter != d_readCallbacks.end()) {
d_iter->d_callback(d_iter->d_fd, d_iter->d_parameter);
continue; // so we don't refind ourselves as writable!
}
d_iter=d_writeCallbacks.find(dvp.dp_fds[n].fd);
d_iter=d_writeCallbacks.find(fds.at(n).fd);
if(d_iter != d_writeCallbacks.end()) {
d_iter->d_callback(d_iter->d_fd, d_iter->d_parameter);
}
}
delete[] dvp.dp_fds;
d_inrun=false;
return ret;
}


+ 5
- 4
dns.hh View File

@@ -37,7 +37,7 @@ struct DNSRecord;

struct SOAData
{
SOAData() : ttl(0), serial(0), refresh(0), retry(0), expire(0), default_ttl(0), db(0), domain_id(-1) {};
SOAData() : ttl(0), serial(0), refresh(0), retry(0), expire(0), minimum(0), db(0), domain_id(-1) {};

DNSName qname;
DNSName nameserver;
@@ -47,9 +47,11 @@ struct SOAData
uint32_t refresh;
uint32_t retry;
uint32_t expire;
uint32_t default_ttl;
uint32_t minimum;
DNSBackend *db;
int domain_id;

uint32_t getNegativeTTL() const { return min(ttl, minimum); }
};

class RCode
@@ -82,7 +84,6 @@ class DNSResourceRecord
{
public:
DNSResourceRecord() : last_modified(0), ttl(0), signttl(0), domain_id(-1), qclass(1), scopeMask(0), auth(1), disabled(0) {};
~DNSResourceRecord(){};
static DNSResourceRecord fromWire(const DNSRecord& d);

enum Place : uint8_t {QUESTION=0, ANSWER=1, AUTHORITY=2, ADDITIONAL=3}; //!< Type describing the positioning within, say, a DNSPacket
@@ -95,7 +96,7 @@ public:
DNSName wildcardname;
string content; //!< what this record points to. Example: 10.1.2.3

// Aligned on 8-byte boundries on systems where time_t is 8 bytes and int
// Aligned on 8-byte boundaries on systems where time_t is 8 bytes and int
// is 4 bytes, aka modern linux on x86_64
time_t last_modified; //!< For autocalculating SOA serial numbers - the backend needs to fill this in



+ 1
- 1
dns_random.cc View File

@@ -64,7 +64,7 @@ static void
kiss_init(unsigned int seed)
{
kiss_seed = seed;
kiss_jsr = 0x5eed5eed; /* simply musn't be 0 */
kiss_jsr = 0x5eed5eed; /* simply mustn't be 0 */
kiss_z = 1 ^ (kiss_w = kiss_jcong = seed); /* w=z=0 is bad, see Rose */
}



+ 24
- 3
dns_random.hh View File

@@ -19,12 +19,33 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef PDNS_DNS_RANDOM
#define PDNS_DNS_RANDOM
#pragma once
#include <cstdint>
#include <limits>

void dns_random_init(const std::string& data = "", bool force_reinit = false);
uint32_t dns_random(uint32_t n);
uint16_t dns_random_uint16();

#endif
namespace pdns {
struct dns_random_engine {

typedef uint32_t result_type;

static constexpr result_type min()
{
return 0;
}

static constexpr result_type max()
{
return std::numeric_limits<result_type>::max() - 1;
}

result_type operator()()
{
return dns_random(std::numeric_limits<result_type>::max());
}
};
}


+ 16
- 9
dnsbackend.hh View File

@@ -19,8 +19,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef DNSBACKEND_HH
#define DNSBACKEND_HH
#pragma once

class DNSPacket;

@@ -183,6 +182,7 @@ public:
unsigned int id;
unsigned int flags;
bool active;
bool published;
};

virtual bool getDomainKeys(const DNSName& name, std::vector<KeyData>& keys) { return false;}
@@ -190,6 +190,8 @@ public:
virtual bool addDomainKey(const DNSName& name, const KeyData& key, int64_t& id){ return false; }
virtual bool activateDomainKey(const DNSName& name, unsigned int id) { return false; }
virtual bool deactivateDomainKey(const DNSName& name, unsigned int id) { return false; }
virtual bool publishDomainKey(const DNSName& name, unsigned int id) { return false; }
virtual bool unpublishDomainKey(const DNSName& name, unsigned int id) { return false; }

virtual bool getTSIGKey(const DNSName& name, DNSName* algorithm, string* content) { return false; }
virtual bool setTSIGKey(const DNSName& name, const DNSName& algorithm, const string& content) { return false; }
@@ -313,8 +315,8 @@ public:
{
}

//! Called when the Master of a domain should be changed
virtual bool setMaster(const DNSName &domain, const string &ip)
//! Called when the Master list of a domain should be changed
virtual bool setMasters(const DNSName &domain, const vector<ComboAddress> &masters)
{
return false;
}
@@ -334,6 +336,12 @@ public:
//! Can be called to seed the getArg() function with a prefix
void setArgPrefix(const string &prefix);

//! Add an entry for a super master
virtual bool superMasterAdd(const string &ip, const string &nameserver, const string &account)
{
return false;
}

//! determine if ip is a supermaster or a domain
virtual bool superMasterBackend(const string &ip, const DNSName &domain, const vector<DNSResourceRecord>&nsset, string *nameserver, string *account, DNSBackend **db)
{
@@ -341,7 +349,7 @@ public:
}

//! called by PowerDNS to create a new domain
virtual bool createDomain(const DNSName &domain)
virtual bool createDomain(const DNSName &domain, const DomainInfo::DomainKind kind, const vector<ComboAddress> &masters, const string &account)
{
return false;
}
@@ -410,10 +418,11 @@ class BackendMakerClass
public:
void report(BackendFactory *bf);
void launch(const string &instr);
vector<DNSBackend *>all(bool skipBIND=false);
vector<DNSBackend *> all(bool skipBIND=false);
void load(const string &module);
int numLauncheable();
size_t numLauncheable() const;
vector<string> getModules();
void clear();

private:
void load_all();