diff --git a/nameserver/server.go b/nameserver/server.go index 598e8171..194a2eb4 100644 --- a/nameserver/server.go +++ b/nameserver/server.go @@ -15,6 +15,7 @@ import ( const ( DefaultServerPort = 53 // The default server port + DefaultHTTPPort = 6785 // The default http port DefaultCLICfgFile = "/etc/resolv.conf" // default "resolv.conf" file to try to load DefaultLocalTTL = 30 // default TTL for responses for local domain queries DefaultUDPBuflen = 4096 // bigger than the default 512 diff --git a/prog/weavedns/main.go b/prog/weavedns/main.go index 9b6ab270..8702719a 100644 --- a/prog/weavedns/main.go +++ b/prog/weavedns/main.go @@ -46,7 +46,7 @@ func main() { flag.StringVar(&domain, "domain", weavedns.DefaultLocalDomain, "local domain (ie, 'weave.local.')") flag.IntVar(&wait, "wait", 0, "number of seconds to wait for interface to be created and come up") flag.IntVar(&dnsPort, "dnsport", weavedns.DefaultServerPort, "port to listen to DNS requests") - flag.IntVar(&httpPort, "httpport", 6785, "port to listen to HTTP requests") + flag.IntVar(&httpPort, "httpport", weavedns.DefaultHTTPPort, "port to listen to HTTP requests") flag.IntVar(&cacheLen, "cache", weavedns.DefaultCacheLen, "cache length") flag.IntVar(&ttl, "ttl", weavedns.DefaultLocalTTL, "TTL (in secs) for responses for local names") flag.BoolVar(&watch, "watch", true, "watch the docker socket for container events") diff --git a/proxy/create_container_interceptor.go b/proxy/create_container_interceptor.go index 616d4d93..b1f10522 100644 --- a/proxy/create_container_interceptor.go +++ b/proxy/create_container_interceptor.go @@ -109,7 +109,7 @@ func (i *createContainerInterceptor) getDNSDomain() (domain string) { return } - url := fmt.Sprintf("http://%s:6785/domain", dnsContainer.NetworkSettings.IPAddress) + url := fmt.Sprintf("http://%s:%d/domain", dnsContainer.NetworkSettings.IPAddress, nameserver.DefaultHTTPPort) resp, err := http.Get(url) if err != nil || resp.StatusCode != http.StatusOK { return