Add create-bridge command
This commit is contained in:
1 parent
6253be6ecf
commit
dfd7d0fe54
1 file changed
+10
-5
@@ -139,11 +139,13 @@ create_bridge() {
|
|||||||
run_iptables -t nat -N WEAVE >/dev/null 2>&1 || true
|
run_iptables -t nat -N WEAVE >/dev/null 2>&1 || true
|
||||||
add_iptables_rule nat POSTROUTING -j WEAVE
|
add_iptables_rule nat POSTROUTING -j WEAVE
|
||||||
}
|
}
|
||||||
# disable offloading - we do this even when $BRIDGE already exists
|
if [ ! "$1" = "--without-ethtool" ] ; then
|
||||||
# simply because it has the desirable side-effect of ensuring we
|
# disable offloading - we do this even when $BRIDGE already exists
|
||||||
# have the $TOOLS_IMAGE and thus do not incur downloading-induced
|
# simply because it has the desirable side-effect of ensuring we
|
||||||
# delays in more time-sensitive sections elsewhere.
|
# have the $TOOLS_IMAGE and thus do not incur downloading-induced
|
||||||
run_tool host ethtool -K $BRIDGE tx off >/dev/null
|
# delays in more time-sensitive sections elsewhere.
|
||||||
|
run_tool host ethtool -K $BRIDGE tx off >/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
ip link set dev $BRIDGE up
|
ip link set dev $BRIDGE up
|
||||||
}
|
}
|
||||||
@@ -453,6 +455,9 @@ case "$COMMAND" in
|
|||||||
docker pull $img
|
docker pull $img
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
create-bridge)
|
||||||
|
create_bridge --without-ethtool
|
||||||
|
;;
|
||||||
launch)
|
launch)
|
||||||
check_not_running $CONTAINER_NAME $BASE_IMAGE
|
check_not_running $CONTAINER_NAME $BASE_IMAGE
|
||||||
create_bridge
|
create_bridge
|
||||||
|
|||||||
Reference in new issue
Block a user