Provide the '--neg-ttl' argument too...
This commit is contained in:
1 parent
858a6dd253
commit
343e9b1f5a
1 file changed
+11
-8
+11
-8
@@ -25,6 +25,7 @@ func main() {
|
|||||||
httpPort int
|
httpPort int
|
||||||
wait int
|
wait int
|
||||||
ttl int
|
ttl int
|
||||||
|
negTTL int
|
||||||
timeout int
|
timeout int
|
||||||
udpbuf int
|
udpbuf int
|
||||||
fallback string
|
fallback string
|
||||||
@@ -51,6 +52,7 @@ func main() {
|
|||||||
flag.BoolVar(&watch, "watch", true, "watch the docker socket for container events")
|
flag.BoolVar(&watch, "watch", true, "watch the docker socket for container events")
|
||||||
flag.BoolVar(&debug, "debug", false, "output debugging info to stderr")
|
flag.BoolVar(&debug, "debug", false, "output debugging info to stderr")
|
||||||
// advanced options
|
// 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(&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(&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)")
|
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{
|
srvConfig := weavedns.DNSServerConfig{
|
||||||
Zone: zone,
|
Zone: zone,
|
||||||
Port: dnsPort,
|
Port: dnsPort,
|
||||||
CacheLen: cacheLen,
|
CacheLen: cacheLen,
|
||||||
LocalTTL: ttl,
|
LocalTTL: ttl,
|
||||||
MaxAnswers: maxAnswers,
|
CacheNegLocalTTL: negTTL,
|
||||||
Timeout: timeout,
|
MaxAnswers: maxAnswers,
|
||||||
UDPBufLen: udpbuf,
|
Timeout: timeout,
|
||||||
CacheDisabled: cacheDisabled,
|
UDPBufLen: udpbuf,
|
||||||
|
CacheDisabled: cacheDisabled,
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(fallback) > 0 {
|
if len(fallback) > 0 {
|
||||||
|
|||||||
Reference in new issue
Block a user