diff --git a/prog/weaver/main.go b/prog/weaver/main.go index c12f8e28..6620efcc 100644 --- a/prog/weaver/main.go +++ b/prog/weaver/main.go @@ -85,7 +85,7 @@ func main() { mflag.IntVar(&config.ConnLimit, []string{"#connlimit", "#-connlimit", "-conn-limit"}, 30, "connection limit (0 for unlimited)") mflag.BoolVar(&noDiscovery, []string{"#nodiscovery", "#-nodiscovery", "-no-discovery"}, false, "disable peer discovery") mflag.IntVar(&bufSzMB, []string{"#bufsz", "-bufsz"}, 8, "capture buffer size in MB") - mflag.StringVar(&httpAddr, []string{"#httpaddr", "#-httpaddr", "-http-addr"}, fmt.Sprintf(":%d", weave.HTTPPort), "address to bind HTTP interface to (disabled if blank, absolute path indicates unix domain socket)") + mflag.StringVar(&httpAddr, []string{"#httpaddr", "#-httpaddr", "-http-addr"}, "", "address to bind HTTP interface to (disabled if blank, absolute path indicates unix domain socket)") mflag.StringVar(&iprangeCIDR, []string{"#iprange", "#-iprange", "-ipalloc-range"}, "", "IP address range reserved for automatic allocation, in CIDR notation") mflag.StringVar(&ipsubnetCIDR, []string{"#ipsubnet", "#-ipsubnet", "-ipalloc-default-subnet"}, "", "subnet to allocate within by default, in CIDR notation") mflag.IntVar(&peerCount, []string{"#initpeercount", "#-initpeercount", "-init-peer-count"}, 0, "number of peers in network (for IP address allocation)") diff --git a/proxy/proxy.go b/proxy/proxy.go index 6618fe51..778742d4 100644 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -17,7 +17,6 @@ import ( . "github.com/weaveworks/weave/common" weavedocker "github.com/weaveworks/weave/common/docker" "github.com/weaveworks/weave/nameserver" - "github.com/weaveworks/weave/router" ) const ( @@ -490,7 +489,7 @@ func (proxy *Proxy) getDNSDomain() (domain string) { weaveIP = "127.0.0.1" } - url := fmt.Sprintf("http://%s:%d/domain", weaveIP, router.HTTPPort) + url := fmt.Sprintf("http://%s:6784/domain", weaveIP) resp, err := http.Get(url) if err != nil || resp.StatusCode != http.StatusOK { return diff --git a/router/router.go b/router/router.go index 44c3fbdc..e02036bd 100644 --- a/router/router.go +++ b/router/router.go @@ -12,7 +12,6 @@ import ( const ( Port = 6783 - HTTPPort = Port + 1 MaxUDPPacketSize = 65535 ChannelSize = 16 TCPHeartbeat = 30 * time.Second diff --git a/weave b/weave index 2da34e83..80bcd57a 100755 --- a/weave +++ b/weave @@ -1463,6 +1463,7 @@ launch_router() { if [ "$BRIDGE_TYPE" = fastdp ] ; then NETHOST_OPT="--net=host" + HTTP_IP=127.0.0.1 # In case there is a lingering veth-weave netdev ip link del $ROUTER_HOSTNETNS_IFNAME >/dev/null 2>&1 || true fi @@ -1481,7 +1482,8 @@ launch_router() { $(router_opts_$BRIDGE_TYPE) \ --ipalloc-range "$IPRANGE" \ --dns-effective-listen-address $DOCKER_BRIDGE_IP \ - ${NETHOST_OPT:+$DNS_ROUTER_OPTS --http-addr 127.0.0.1:$HTTP_PORT} $NO_DNS_OPT \ + ${NETHOST_OPT:+$DNS_ROUTER_OPTS} $NO_DNS_OPT \ + --http-addr $HTTP_IP:$HTTP_PORT \ --docker-api "unix:///var/run/docker.sock" "$@") with_container_netns_or_die $CONTAINER_NAME setup_router_iface_$BRIDGE_TYPE attach_router