diff --git a/weave b/weave index e785b22a..c23570d2 100755 --- a/weave +++ b/weave @@ -689,7 +689,7 @@ init_fastdp() { ip link set dev $DATAPATH mtu $MTU } -init_bridge() { +init_bridge_prep() { # Observe any MTU that is already set [ -n "$MTU" ] || MTU=${WEAVE_MTU:-65535} @@ -717,12 +717,17 @@ init_bridge() { ip link del dev v${CONTAINER_IFNAME}du } +init_bridge() { + init_bridge_prep + create_veth $BRIDGE_IFNAME $PCAP_IFNAME add_iface_bridge $BRIDGE_IFNAME +} + init_bridged_fastdp() { # Initialise the datapath as normal. NB sets MTU for use below init_fastdp # Initialise the bridge using fast datapath MTU - init_bridge + init_bridge_prep # Create linking veth pair create_veth $BRIDGE_IFNAME $DATAPATH_IFNAME configure_veth_bridged_fastdp @@ -853,18 +858,6 @@ ask_version() { [ -n "$DOCKERIMAGE" ] && docker run --rm --net=none -e WEAVE_CIDR=none $3 $DOCKERIMAGE $COVERAGE_ARGS --version } -setup_router_iface_fastdp() { - true -} - -setup_router_iface_bridge() { - create_veth $BRIDGE_IFNAME $PCAP_IFNAME add_iface_bridge $BRIDGE_IFNAME -} - -setup_router_iface_bridged_fastdp() { - setup_router_iface_fastdp "$@" -} - container_in_host_ns() { [ -h "$CONTAINER_NETNS" -a -h "/proc/self/ns/net" -a "$(readlink $CONTAINER_NETNS)" = "$(readlink /proc/self/ns/net)" ] } @@ -1673,7 +1666,6 @@ launch_router() { --http-addr $HTTP_ADDR \ --resolv-conf "/var/run/weave/etc/$RESOLV_CONF_BASE" \ "$@") - setup_router_iface_$BRIDGE_TYPE wait_for_status $CONTAINER_NAME http_call $HTTP_ADDR setup_awsvpc populate_router @@ -1993,7 +1985,6 @@ EOF ! docker inspect -f '{{.Config.Cmd}}' $CONTAINER_NAME | grep -q -- "--awsvpc" || AWSVPC=1 create_bridge fetch_router_args - setup_router_iface_$BRIDGE_TYPE wait_for_status $CONTAINER_NAME http_call $HTTP_ADDR setup_awsvpc populate_router