From b02649f774ee92d6a436fc12d2b4e82c213426e2 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 17 Sep 2020 00:19:00 +0200 Subject: [PATCH] Error out if the dns64 plugin is enabled without listening sockets --- dnscrypt-proxy/config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dnscrypt-proxy/config.go b/dnscrypt-proxy/config.go index c180b157..86a103d8 100644 --- a/dnscrypt-proxy/config.go +++ b/dnscrypt-proxy/config.go @@ -585,6 +585,9 @@ func ConfigLoad(proxy *Proxy, flags *ConfigFlags) error { proxy.serversBlockingFragments = config.BrokenImplementations.FragmentsBlocked + if (len(config.DNS64.Prefixes) != 0 || len(config.DNS64.Resolvers) != 0) && len(config.ListenAddresses) == 0 { + dlog.Fatal("`listenAddresses` cannot be empty in order to use DNS64 translation") + } proxy.dns64Prefixes = config.DNS64.Prefixes proxy.dns64Resolvers = config.DNS64.Resolvers