diff options
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 171 |
1 files changed, 155 insertions, 16 deletions
diff --git a/Makefile.am b/Makefile.am index f81f8bf..faaeefd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,7 +13,8 @@ AM_CPPFLAGS += $(SYSTEMD_CFLAGS) \ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS=ext/ipcrypt \ +SUBDIRS=ext/arc4random \ + ext/ipcrypt \ ext/yahttp CLEANFILES = \ @@ -79,6 +80,10 @@ if HAVE_LIBSSL AM_CPPFLAGS += $(LIBSSL_CFLAGS) endif +if HAVE_GNUTLS +AM_CPPFLAGS += $(GNUTLS_CFLAGS) +endif + if HAVE_LIBH2OEVLOOP AM_CPPFLAGS += $(LIBH2OEVLOOP_CFLAGS) endif @@ -105,6 +110,7 @@ EXTRA_DIST=COPYING \ kqueuemplexer.cc \ portsmplexer.cc \ cdb.cc cdb.hh \ + standalone_fuzz_target_runner.cc \ ext/lmdb-safe/lmdb-safe.cc ext/lmdb-safe/lmdb-safe.hh \ ext/protozero/include/* \ builder-support/gen-version @@ -113,7 +119,7 @@ bin_PROGRAMS = dnsdist if UNIT_TESTS noinst_PROGRAMS = testrunner -TESTS_ENVIRONMENT = env BOOST_TEST_LOG_LEVEL=message SRCDIR='$(srcdir)' +TESTS_ENVIRONMENT = env BOOST_TEST_LOG_LEVEL=message BOOST_TEST_RANDOM=1 SRCDIR='$(srcdir)' TESTS=testrunner else check-local: @@ -130,8 +136,10 @@ dnsdist_SOURCES = \ burtle.hh \ cachecleaner.hh \ capabilities.cc capabilities.hh \ + channel.cc channel.hh \ circular_buffer.hh \ connection-management.hh \ + coverage.cc coverage.hh \ credentials.cc credentials.hh \ dns.cc dns.hh \ dns_random.hh \ @@ -143,13 +151,16 @@ dnsdist_SOURCES = \ dnsdist-carbon.cc dnsdist-carbon.hh \ dnsdist-concurrent-connections.hh \ dnsdist-console.cc dnsdist-console.hh \ + dnsdist-crypto.cc dnsdist-crypto.hh \ dnsdist-discovery.cc dnsdist-discovery.hh \ dnsdist-dnscrypt.cc \ dnsdist-dnsparser.cc dnsdist-dnsparser.hh \ + dnsdist-doh-common.cc dnsdist-doh-common.hh \ dnsdist-downstream-connection.hh \ dnsdist-dynblocks.cc dnsdist-dynblocks.hh \ dnsdist-dynbpf.cc dnsdist-dynbpf.hh \ dnsdist-ecs.cc dnsdist-ecs.hh \ + dnsdist-edns.cc dnsdist-edns.hh \ dnsdist-healthchecks.cc dnsdist-healthchecks.hh \ dnsdist-idstate.hh \ dnsdist-internal-queries.cc dnsdist-internal-queries.hh \ @@ -167,6 +178,7 @@ dnsdist_SOURCES = \ dnsdist-lua-bindings.cc \ dnsdist-lua-ffi-interface.h dnsdist-lua-ffi-interface.inc \ dnsdist-lua-ffi.cc dnsdist-lua-ffi.hh \ + dnsdist-lua-hooks.cc dnsdist-lua-hooks.hh \ dnsdist-lua-inspection-ffi.cc dnsdist-lua-inspection-ffi.h \ dnsdist-lua-inspection.cc \ dnsdist-lua-network.cc dnsdist-lua-network.hh \ @@ -176,12 +188,14 @@ dnsdist_SOURCES = \ dnsdist-lua.cc dnsdist-lua.hh \ dnsdist-mac-address.cc dnsdist-mac-address.hh \ dnsdist-metrics.cc dnsdist-metrics.hh \ - dnsdist-nghttp2.cc dnsdist-nghttp2.hh \ + dnsdist-nghttp2-in.hh \ + dnsdist-nghttp2.hh \ dnsdist-prometheus.hh \ dnsdist-protobuf.cc dnsdist-protobuf.hh \ dnsdist-protocols.cc dnsdist-protocols.hh \ dnsdist-proxy-protocol.cc dnsdist-proxy-protocol.hh \ dnsdist-random.cc dnsdist-random.hh \ + dnsdist-resolver.cc dnsdist-resolver.hh \ dnsdist-rings.cc dnsdist-rings.hh \ dnsdist-rules.cc dnsdist-rules.hh \ dnsdist-secpoll.cc dnsdist-secpoll.hh \ @@ -194,15 +208,20 @@ dnsdist_SOURCES = \ dnsdist-tcp.cc dnsdist-tcp.hh \ dnsdist-web.cc dnsdist-web.hh \ dnsdist-xpf.cc dnsdist-xpf.hh \ + dnsdist-xsk.cc dnsdist-xsk.hh \ dnsdist.cc dnsdist.hh \ dnslabeltext.cc \ dnsname.cc dnsname.hh \ dnsparser.hh dnsparser.cc \ dnstap.cc dnstap.hh \ dnswriter.cc dnswriter.hh \ - doh.hh doh.cc \ - dolog.hh \ + doh.hh \ + doh3.hh \ + dolog.cc dolog.hh \ + doq-common.hh \ + doq.hh \ ednscookies.cc ednscookies.hh \ + ednsextendederror.cc ednsextendederror.hh \ ednsoptions.cc ednsoptions.hh \ ednssubnet.cc ednssubnet.hh \ ext/json11/json11.cpp \ @@ -229,7 +248,6 @@ dnsdist_SOURCES = \ remote_logger.cc remote_logger.hh \ sholder.hh \ snmp-agent.cc snmp-agent.hh \ - sodcrypto.cc sodcrypto.hh \ sstuff.hh \ stat_t.hh \ statnode.cc statnode.hh \ @@ -238,12 +256,15 @@ dnsdist_SOURCES = \ tcpiohandler.cc tcpiohandler.hh \ threadname.hh threadname.cc \ uuid-utils.hh uuid-utils.cc \ - xpf.cc xpf.hh + views.hh \ + xpf.cc xpf.hh \ + xsk.cc xsk.hh testrunner_SOURCES = \ base64.hh \ bpf-filter.cc bpf-filter.hh \ cachecleaner.hh \ + channel.cc channel.hh \ circular_buffer.hh \ connection-management.hh \ credentials.cc credentials.hh \ @@ -254,11 +275,14 @@ testrunner_SOURCES = \ dnsdist-backoff.hh \ dnsdist-cache.cc dnsdist-cache.hh \ dnsdist-concurrent-connections.hh \ + dnsdist-crypto.cc dnsdist-crypto.hh \ dnsdist-dnsparser.cc dnsdist-dnsparser.hh \ + dnsdist-doh-common.cc dnsdist-doh-common.hh \ dnsdist-downstream-connection.hh \ dnsdist-dynblocks.cc dnsdist-dynblocks.hh \ dnsdist-dynbpf.cc dnsdist-dynbpf.hh \ dnsdist-ecs.cc dnsdist-ecs.hh \ + dnsdist-edns.cc dnsdist-edns.hh \ dnsdist-idstate.hh \ dnsdist-kvs.cc dnsdist-kvs.hh \ dnsdist-lbpolicies.cc dnsdist-lbpolicies.hh \ @@ -271,10 +295,12 @@ testrunner_SOURCES = \ dnsdist-lua-vars.cc \ dnsdist-mac-address.cc dnsdist-mac-address.hh \ dnsdist-metrics.cc dnsdist-metrics.hh \ - dnsdist-nghttp2.cc dnsdist-nghttp2.hh \ + dnsdist-nghttp2-in.hh \ + dnsdist-nghttp2.hh \ dnsdist-protocols.cc dnsdist-protocols.hh \ dnsdist-proxy-protocol.cc dnsdist-proxy-protocol.hh \ dnsdist-random.cc dnsdist-random.hh \ + dnsdist-resolver.cc dnsdist-resolver.hh \ dnsdist-rings.cc dnsdist-rings.hh \ dnsdist-rules.cc dnsdist-rules.hh \ dnsdist-session-cache.cc dnsdist-session-cache.hh \ @@ -282,13 +308,15 @@ testrunner_SOURCES = \ dnsdist-tcp-downstream.cc \ dnsdist-tcp.cc dnsdist-tcp.hh \ dnsdist-xpf.cc dnsdist-xpf.hh \ + dnsdist-xsk.cc dnsdist-xsk.hh \ dnsdist.hh \ dnslabeltext.cc \ dnsname.cc dnsname.hh \ dnsparser.hh dnsparser.cc \ dnswriter.cc dnswriter.hh \ - dolog.hh \ + dolog.cc dolog.hh \ ednscookies.cc ednscookies.hh \ + ednsextendederror.cc ednsextendederror.hh \ ednsoptions.cc ednsoptions.hh \ ednssubnet.cc ednssubnet.hh \ ext/luawrapper/include/LuaContext.hpp \ @@ -302,12 +330,12 @@ testrunner_SOURCES = \ proxy-protocol.cc proxy-protocol.hh \ qtype.cc qtype.hh \ sholder.hh \ - sodcrypto.cc \ sstuff.hh \ stat_t.hh \ statnode.cc statnode.hh \ svc-records.cc svc-records.hh \ test-base64_cc.cc \ + test-channel.cc \ test-connectionmanagement_hh.cc \ test-credentials_cc.cc \ test-delaypipe_hh.cc \ @@ -320,10 +348,11 @@ testrunner_SOURCES = \ test-dnsdistbackend_cc.cc \ test-dnsdistbackoff.cc \ test-dnsdistdynblocks_hh.cc \ + test-dnsdistedns.cc \ test-dnsdistkvs_cc.cc \ test-dnsdistlbpolicies_cc.cc \ test-dnsdistluanetwork.cc \ - test-dnsdistnghttp2_cc.cc \ + test-dnsdistnghttp2_common.hh \ test-dnsdistpacketcache_cc.cc \ test-dnsdistrings_cc.cc \ test-dnsdistrules_cc.cc \ @@ -337,7 +366,8 @@ testrunner_SOURCES = \ testrunner.cc \ threadname.hh threadname.cc \ uuid-utils.hh uuid-utils.cc \ - xpf.cc xpf.hh + xpf.cc xpf.hh \ + xsk.cc xsk.hh dnsdist_LDFLAGS = \ $(AM_LDFLAGS) \ @@ -354,7 +384,8 @@ dnsdist_LDADD = \ $(SYSTEMD_LIBS) \ $(NET_SNMP_LIBS) \ $(LIBCAP_LIBS) \ - $(IPCRYPT_LIBS) + $(IPCRYPT_LIBS) \ + $(ARC4RANDOM_LIBS) testrunner_LDFLAGS = \ $(AM_LDFLAGS) \ @@ -368,7 +399,8 @@ testrunner_LDADD = \ $(LIBSODIUM_LIBS) \ $(LUA_LIBS) \ $(RT_LIBS) \ - $(LIBCAP_LIBS) + $(LIBCAP_LIBS) \ + $(ARC4RANDOM_LIBS) if HAVE_CDB dnsdist_LDADD += $(CDB_LDFLAGS) $(CDB_LIBS) @@ -385,6 +417,13 @@ if HAVE_LIBSSL dnsdist_LDADD += $(LIBSSL_LIBS) endif +if HAVE_XSK +dnsdist_LDADD += -lbpf +dnsdist_LDADD += -lxdp +testrunner_LDADD += -lbpf +testrunner_LDADD += -lxdp +endif + if HAVE_LIBCRYPTO dnsdist_LDADD += $(LIBCRYPTO_LDFLAGS) $(LIBCRYPTO_LIBS) testrunner_LDADD += $(LIBCRYPTO_LDFLAGS) $(LIBCRYPTO_LIBS) @@ -406,17 +445,42 @@ endif if HAVE_DNS_OVER_HTTPS -if HAVE_LIBH2OEVLOOP -dnsdist_LDADD += $(LIBH2OEVLOOP_LIBS) +if HAVE_GNUTLS +dnsdist_LDADD += -lgnutls endif +if HAVE_LIBH2OEVLOOP +dnsdist_SOURCES += doh.cc +dnsdist_LDADD += $(LIBH2OEVLOOP_LIBS) endif if HAVE_NGHTTP2 +dnsdist_SOURCES += dnsdist-nghttp2-in.cc +dnsdist_SOURCES += dnsdist-nghttp2.cc +testrunner_SOURCES += dnsdist-nghttp2-in.cc +testrunner_SOURCES += dnsdist-nghttp2.cc +testrunner_SOURCES += test-dnsdistnghttp2-in_cc.cc \ + test-dnsdistnghttp2_cc.cc dnsdist_LDADD += $(NGHTTP2_LDFLAGS) $(NGHTTP2_LIBS) testrunner_LDADD += $(NGHTTP2_LDFLAGS) $(NGHTTP2_LIBS) endif +endif + +if HAVE_DNS_OVER_QUIC +dnsdist_SOURCES += doq.cc +endif + +if HAVE_DNS_OVER_HTTP3 +dnsdist_SOURCES += doh3.cc +endif + +if HAVE_QUICHE +AM_CPPFLAGS += $(QUICHE_CFLAGS) +dnsdist_LDADD += $(QUICHE_LDFLAGS) $(QUICHE_LIBS) +dnsdist_SOURCES += doq-common.cc +endif + if !HAVE_LUA_HPP BUILT_SOURCES += lua.hpp nodist_dnsdist_SOURCES = lua.hpp @@ -448,6 +512,81 @@ testrunner_SOURCES += \ portsmplexer.cc endif +if FUZZ_TARGETS + +LIB_FUZZING_ENGINE ?= standalone_fuzz_target_runner.o + +standalone_fuzz_target_runner.o: standalone_fuzz_target_runner.cc + +fuzz_targets_programs = \ + fuzz_target_dnsdistcache + +if HAVE_XSK +fuzz_targets_programs += \ + fuzz_target_xsk +endif + +fuzz_targets: $(ARC4RANDOM_LIBS) $(fuzz_targets_programs) + +bin_PROGRAMS += \ + $(fuzz_targets_programs) + +fuzz_targets_libs = \ + $(LIBCRYPTO_LIBS) \ + $(ARC4RANDOM_LIBS) \ + $(LIB_FUZZING_ENGINE) + +fuzz_targets_ldflags = \ + $(AM_LDFLAGS) \ + $(DYNLINKFLAGS) \ + $(LIBCRYPTO_LDFLAGS) \ + $(FUZZING_LDFLAGS) + +# we need the mockup runner to be built, but not linked if a real fuzzing engine is used +fuzz_targets_deps = standalone_fuzz_target_runner.o + +fuzz_target_dnsdistcache_SOURCES = \ + channel.hh channel.cc \ + dns.cc dns.hh \ + dnsdist-cache.cc dnsdist-cache.hh \ + dnsdist-dnsparser.cc dnsdist-dnsparser.hh \ + dnsdist-ecs.cc dnsdist-ecs.hh \ + dnsdist-idstate.hh \ + dnsdist-protocols.cc dnsdist-protocols.hh \ + dnslabeltext.cc \ + dnsname.cc dnsname.hh \ + dnsparser.cc dnsparser.hh \ + dnswriter.cc dnswriter.hh \ + doh.hh \ + ednsoptions.cc ednsoptions.hh \ + ednssubnet.cc ednssubnet.hh \ + fuzz_dnsdistcache.cc \ + iputils.cc iputils.hh \ + misc.cc misc.hh \ + packetcache.hh \ + qtype.cc qtype.hh \ + svc-records.cc svc-records.hh + +fuzz_target_dnsdistcache_DEPENDENCIES = $(fuzz_targets_deps) +fuzz_target_dnsdistcache_LDFLAGS = $(fuzz_targets_ldflags) +fuzz_target_dnsdistcache_LDADD = $(fuzz_targets_libs) + +if HAVE_XSK +fuzz_target_xsk_SOURCES = \ + dnslabeltext.cc \ + dnsname.cc dnsname.hh \ + fuzz_xsk.cc \ + gettime.cc gettime.hh \ + iputils.cc iputils.hh \ + misc.cc misc.hh \ + xsk.cc xsk.hh +fuzz_target_xsk_DEPENDENCIES = $(fuzz_targets_deps) +fuzz_target_xsk_LDFLAGS = $(fuzz_targets_ldflags) +fuzz_target_xsk_LDADD = $(fuzz_targets_libs) -lbpf -lxdp +endif # HAVE_XSK + +endif # FUZZ_TARGETS + MANPAGES=dnsdist.1 dist_man_MANS=$(MANPAGES) |