From ca7e5e5bcb220e9c31053c6185805bf493ad56b6 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 17 Nov 2019 15:07:40 +0100 Subject: [PATCH] Rename a few things --- dnscrypt-proxy/config.go | 4 ++-- dnscrypt-proxy/example-dnscrypt-proxy.toml | 9 ++++++--- dnscrypt-proxy/proxy.go | 2 +- dnscrypt-proxy/serversInfo.go | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/dnscrypt-proxy/config.go b/dnscrypt-proxy/config.go index f5acfef9..62454bcb 100644 --- a/dnscrypt-proxy/config.go +++ b/dnscrypt-proxy/config.go @@ -183,7 +183,7 @@ type AnonymizedDNSConfig struct { } type BrokenImplementationsConfig struct { - IncorrectPadding []string `toml:"incorrect_padding"` + BrokenQueryPadding []string `toml:"broken_query_padding"` } type ServerSummary struct { @@ -441,7 +441,7 @@ func ConfigLoad(proxy *Proxy, flags *ConfigFlags) error { } proxy.routes = &routes } - proxy.serversWithIncorrectPadding = config.BrokenImplementations.IncorrectPadding + proxy.serversWithBrokenQueryPadding = config.BrokenImplementations.BrokenQueryPadding if *flags.ListAll { config.ServerNames = nil diff --git a/dnscrypt-proxy/example-dnscrypt-proxy.toml b/dnscrypt-proxy/example-dnscrypt-proxy.toml index 0d7def74..f25fd440 100644 --- a/dnscrypt-proxy/example-dnscrypt-proxy.toml +++ b/dnscrypt-proxy/example-dnscrypt-proxy.toml @@ -575,10 +575,13 @@ cache_neg_max_ttl = 600 [broken_implementations] -# Cisco servers currently cannot handle queries larger than 1472 bytes. -# This prevents large DNSCrypt responses from being received, and breaks relaying. +# Cisco servers currently cannot handle queries larger than 1472 bytes, and don't +# truncate reponses larger than questions as expected by the DNSCrypt protocol. +# This prevents large responses from being received, and breaks relaying. +# A workaround for the first issue will be applied to servers in list below. +# Do not change that list until the bugs are fixed server-side. -incorrect_padding = ['cisco', 'cisco-ipv6', 'cisco-familyshield'] +broken_query_padding = ['cisco', 'cisco-ipv6', 'cisco-familyshield'] diff --git a/dnscrypt-proxy/proxy.go b/dnscrypt-proxy/proxy.go index 0bdd5374..58f9a27b 100644 --- a/dnscrypt-proxy/proxy.go +++ b/dnscrypt-proxy/proxy.go @@ -71,7 +71,7 @@ type Proxy struct { blockedQueryResponse string queryMeta []string routes *map[string][]string - serversWithIncorrectPadding []string + serversWithBrokenQueryPadding []string showCerts bool } diff --git a/dnscrypt-proxy/serversInfo.go b/dnscrypt-proxy/serversInfo.go index 6e74e2d3..bf3ca334 100644 --- a/dnscrypt-proxy/serversInfo.go +++ b/dnscrypt-proxy/serversInfo.go @@ -299,7 +299,7 @@ func fetchDNSCryptServerInfo(proxy *Proxy, name string, stamp stamps.ServerStamp stamp.ServerPk = serverPk } knownBugs := ServerBugs{} - for _, buggyServerName := range proxy.serversWithIncorrectPadding { + for _, buggyServerName := range proxy.serversWithBrokenQueryPadding { if buggyServerName == name { knownBugs.incorrectPadding = true dlog.Infof("Known bug in [%v]: padding is not correctly implemented", name)