Skip to content

Commit

Permalink
Use stubDoResolve for ALIAS
Browse files Browse the repository at this point in the history
  • Loading branch information
zeha committed Aug 28, 2024
1 parent b050d70 commit 95880fa
Show file tree
Hide file tree
Showing 9 changed files with 108 additions and 490 deletions.
2 changes: 0 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,6 @@ common_sources += files(
src_dir / 'dnspacket.hh',
src_dir / 'dnsparser.cc',
src_dir / 'dnsparser.hh',
src_dir / 'dnsproxy.cc',
src_dir / 'dnsproxy.hh',
src_dir / 'dnsrecords.cc',
src_dir / 'dnsrecords.hh',
src_dir / 'dnssecinfra.cc',
Expand Down
37 changes: 33 additions & 4 deletions pdns/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ pdns_server_SOURCES = \
dnsname.cc dnsname.hh \
dnspacket.cc dnspacket.hh \
dnsparser.cc \
dnsproxy.cc dnsproxy.hh \
dnsrecords.cc dnsrecords.hh \
dnssecinfra.cc dnssecinfra.hh \
dnsseckeeper.hh \
Expand Down Expand Up @@ -595,7 +594,7 @@ sdig_LDADD += $(LIBSSL_LIBS)
endif

if LIBSODIUM
sdig_CPPFLAGS +=$(LIBSODIUM_CFLAGS)
sdig_CPPFLAGS += $(LIBSODIUM_CFLAGS)
sdig_LDADD += $(LIBSODIUM_LIBS)
endif

Expand Down Expand Up @@ -656,28 +655,49 @@ stubquery_SOURCES = \
arguments.cc arguments.hh \
base32.cc \
base64.cc \
dns.cc dns.hh \
dnslabeltext.cc \
dnsname.cc \
dnspacket.cc \
dnsparser.cc \
dnsrecords.cc \
dnssecinfra.cc dnssecinfra.hh \
dnswriter.cc \
ednscookies.cc ednscookies.hh \
ednsoptions.cc ednsoptions.hh \
ednssubnet.cc ednssubnet.hh \
gss_context.cc gss_context.hh \
iputils.cc \
logger.cc \
misc.cc \
nsecrecords.cc \
qtype.cc \
rcpgenerator.cc \
shuffle.cc shuffle.hh \
sillyrecords.cc \
statbag.cc \
stubquery.cc \
stubresolver.cc stubresolver.hh \
svc-records.cc svc-records.hh \
tsigverifier.cc tsigverifier.hh \
unix_utility.cc

stubquery_CPPFLAGS = $(AM_CPPFLAGS)
stubquery_LDADD = $(LIBCRYPTO_LIBS)
stubquery_LDFLAGS = $(AM_LDFLAGS) $(LIBCRYPTO_LDFLAGS)
if GSS_TSIG
stubquery_LDADD += $(GSS_LIBS)
endif

if PKCS11
stubquery_SOURCES += pkcs11signers.cc pkcs11signers.hh
stubquery_LDADD += $(P11KIT1_LIBS)
endif

if LIBSODIUM
stubquery_CPPFLAGS += $(LIBSODIUM_CFLAGS)
stubquery_LDADD += $(LIBSODIUM_LIBS)
endif

saxfr_SOURCES = \
base32.cc \
Expand Down Expand Up @@ -800,14 +820,16 @@ ixplore_SOURCES = \
axfr-retriever.cc \
base32.cc \
base64.cc base64.hh \
dns.cc \
dns.cc dns.hh \
dns_random.hh \
dnslabeltext.cc \
dnsname.cc dnsname.hh \
dnspacket.cc dnspacket.hh \
dnsparser.cc dnsparser.hh \
dnsrecords.cc \
dnssecinfra.cc \
dnssecinfra.cc dnssecinfra.hh \
dnswriter.cc dnswriter.hh \
ednscookies.cc ednscookies.hh \
ednsoptions.cc ednsoptions.hh \
ednssubnet.cc ednssubnet.hh \
gss_context.cc gss_context.hh \
Expand All @@ -822,13 +844,15 @@ ixplore_SOURCES = \
query-local-address.hh query-local-address.cc \
rcpgenerator.cc rcpgenerator.hh \
resolver.cc \
shuffle.cc shuffle.hh \
sillyrecords.cc \
sstuff.hh \
statbag.cc \
svc-records.cc svc-records.hh \
tsigverifier.cc tsigverifier.hh \
unix_utility.cc zoneparser-tng.cc

ixplore_CPPFLAGS = $(AM_CPPFLAGS)
ixplore_LDADD = $(LIBCRYPTO_LIBS)
ixplore_LDFLAGS = $(AM_LDFLAGS) $(LIBCRYPTO_LDFLAGS)
if GSS_TSIG
Expand All @@ -840,6 +864,11 @@ ixplore_SOURCES += pkcs11signers.cc pkcs11signers.hh
ixplore_LDADD += $(P11KIT1_LIBS)
endif

if LIBSODIUM
ixplore_CPPFLAGS += $(LIBSODIUM_CFLAGS)
ixplore_LDADD += $(LIBSODIUM_LIBS)
endif

dnstcpbench_SOURCES = \
base32.cc \
base64.cc base64.hh \
Expand Down
7 changes: 0 additions & 7 deletions pdns/auth-main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
#include "dynlistener.hh"
#include "dynhandler.hh"
#include "communicator.hh"
#include "dnsproxy.hh"
#include "utility.hh"
#include "dnsrecords.hh"
#include "version.hh"
Expand Down Expand Up @@ -123,7 +122,6 @@ StatBag S; //!< Statistics are gathered across PDNS via the StatBag class S
AuthPacketCache PC; //!< This is the main PacketCache, shared across all threads
AuthQueryCache QC;
AuthZoneCache g_zoneCache;
std::unique_ptr<DNSProxy> DP{nullptr};
static std::unique_ptr<DynListener> s_dynListener{nullptr};
CommunicatorClass Communicator;
static double avg_latency{0.0}, receive_latency{0.0}, cache_latency{0.0}, backend_latency{0.0}, send_latency{0.0};
Expand Down Expand Up @@ -786,11 +784,6 @@ static void mainthread()
AuthWebServer webserver;
Utility::dropUserPrivs(newuid);

if (::arg().mustDo("resolver")) {
DP = std::make_unique<DNSProxy>(::arg()["resolver"], ::arg()["dnsproxy-udp-port-range"]);
DP->go();
}

try {
doSecPoll(true);
}
Expand Down
2 changes: 0 additions & 2 deletions pdns/auth-main.hh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "communicator.hh"
#include "distributor.hh"
#include "dnspacket.hh"
#include "dnsproxy.hh"
#include "dynlistener.hh"
#include "nameserver.hh"
#include "statbag.hh"
Expand All @@ -40,7 +39,6 @@ extern ArgvMap theArg;
extern StatBag S; //!< Statistics are gathered across PDNS via the StatBag class S
extern AuthPacketCache PC; //!< This is the main PacketCache, shared across all threads
extern AuthQueryCache QC;
extern std::unique_ptr<DNSProxy> DP;
extern CommunicatorClass Communicator;
void carbonDumpThread(); // Implemented in auth-carbon.cc. Avoids having an auth-carbon.hh declaring exactly one function.
extern bool g_anyToTcp;
Expand Down
Loading

0 comments on commit 95880fa

Please sign in to comment.