From 7e545957536142a995ee8176c2b2a44f085e5dfb Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sun, 14 Nov 2021 14:01:10 +0700 Subject: all: update share module The update bring new features and enhancements for DNS server. * add support to save and load caches to/from storage rescached now able to save and load caches to local storage upon restart. On POSIX, the caches is stored in /var/cache/rescached/rescached.gob, encoded using gob. Update #9 * remove the fallback name servers (NS) from server options The original idea of fallback NS is to send the query to the one define in resolv.conf, instead of using the one defined by user in ServerOptions NameServers, when an error occured. But, most of error usually caused by network (disconnected, time out), so re-sending query to fallback NS does not have any effect if the network it self is not working. This changes remove the unnecessary and complex fallback NS from server. * do not cache truncated answer Previously only answer with non-zero response code is ignored. This changes ignore also answer where response header is truncated. * lib/dns: make the TCP forwarders as complementary of UDP The TCP forwarders only active when client send the DNS request as TCP. When the server receive that request it should also forward the request as TCP not as UDP to prevent the truncated response. Another use case for TCP is when the response is truncated, the client will send the query back through TCP connection. The server should forward this request using TCP instead of UDP. --- environment.go | 2 -- 1 file changed, 2 deletions(-) (limited to 'environment.go') diff --git a/environment.go b/environment.go index d976702..bd316c6 100644 --- a/environment.go +++ b/environment.go @@ -153,8 +153,6 @@ func (env *environment) loadResolvConf() (ok bool, err error) { if len(env.NameServers) == 0 { env.NameServers = rc.NameServers - } else { - env.FallbackNS = rc.NameServers } return true, nil -- cgit v1.3