From 343e9b1f5a81dcc4f4621db2cb361b68e4402463 Mon Sep 17 00:00:00 2001 From: Alvaro Saurin Date: Fri, 29 May 2015 12:55:41 +0200 Subject: [PATCH] Provide the '--neg-ttl' argument too... --- weavedns/main.go | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/weavedns/main.go b/weavedns/main.go index b8c595ab..45671c5b 100644 --- a/weavedns/main.go +++ b/weavedns/main.go @@ -25,6 +25,7 @@ func main() { httpPort int wait int ttl int + negTTL int timeout int udpbuf int fallback string @@ -51,6 +52,7 @@ func main() { flag.BoolVar(&watch, "watch", true, "watch the docker socket for container events") flag.BoolVar(&debug, "debug", false, "output debugging info to stderr") // advanced options + flag.IntVar(&negTTL, "neg-ttl", weavedns.DefaultCacheNegLocalTTL, "negative TTL (in secs) for unanswered queries for local names") flag.IntVar(&refreshInterval, "refresh", weavedns.DefaultRefreshInterval, "refresh interval (in secs) for local names (0=disable)") flag.IntVar(&refreshWorkers, "refresh-workers", weavedns.DefaultNumUpdaters, "default number of background updaters") flag.IntVar(&maxAnswers, "max-answers", weavedns.DefaultMaxAnswers, "maximum number of answers returned to clients (0=unlimited)") @@ -107,14 +109,15 @@ func main() { } srvConfig := weavedns.DNSServerConfig{ - Zone: zone, - Port: dnsPort, - CacheLen: cacheLen, - LocalTTL: ttl, - MaxAnswers: maxAnswers, - Timeout: timeout, - UDPBufLen: udpbuf, - CacheDisabled: cacheDisabled, + Zone: zone, + Port: dnsPort, + CacheLen: cacheLen, + LocalTTL: ttl, + CacheNegLocalTTL: negTTL, + MaxAnswers: maxAnswers, + Timeout: timeout, + UDPBufLen: udpbuf, + CacheDisabled: cacheDisabled, } if len(fallback) > 0 {