Error out if the dns64 plugin is enabled without listening sockets

This commit is contained in:
Frank Denis 2020-09-17 00:19:00 +02:00
parent c74b993cbb
commit b02649f774
1 changed files with 3 additions and 0 deletions

View File

@ -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