aboutsummaryrefslogtreecommitdiff
path: root/net/openvswitch/files
diff options
context:
space:
mode:
authorStijn Tintel <stijn@linux-ipv6.be>2021-10-29 20:27:56 +0200
committerYousong Zhou <yszhou4tech@gmail.com>2021-11-19 14:15:42 +0800
commit596051c77e8470e856ca200686b4fb55359e027a (patch)
treeebc33ac159395b3f62215f425643e450c97750a0 /net/openvswitch/files
parentdf847e1c0349c3f1f557d7ddc9e3563b7ccb69e9 (diff)
openvswitch: bring up member ports
Open vSwitch does not bring up ports automatically. This is not a problem for wireless ports, or for ports configured in /etc/config/network, but other ports will be down, and require manual interaction to be brought up. Configuring them with proto none will cause netifd to do some actions on them, which might cause undefined results, and will also bloat the UCI config file. The cleanest solution is to bring all member ports up as part of the init script. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Diffstat (limited to 'net/openvswitch/files')
-rwxr-xr-xnet/openvswitch/files/openvswitch.init8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/openvswitch/files/openvswitch.init b/net/openvswitch/files/openvswitch.init
index f4a88edcf..abbbbf792 100755
--- a/net/openvswitch/files/openvswitch.init
+++ b/net/openvswitch/files/openvswitch.init
@@ -121,6 +121,7 @@ ovs_bridge_port_add() {
}
ovs-vsctl --may-exist add-port "$name" "$port" ${type:+ -- set interface "$port" type="$type"}
+ ovs_bridge_port_up "$port"
__port_list="$__port_list ${port} "
}
@@ -162,6 +163,7 @@ ovs_bridge_port_add_complex() {
ovs-vsctl --may-exist add-port "$bridge" "$port" ${tag:+tag="$tag"} \
${ofport:+ -- set interface "$port" ofport_request="$ofport"} \
${type:+ -- set interface "$port" type="$type"}
+ ovs_bridge_port_up "$port"
__port_list="$__port_list ${port} "
}
@@ -174,6 +176,12 @@ ovs_bridge_port_cleanup() {
done
}
+ovs_bridge_port_up() {
+ local port="$1"
+
+ ip link set dev "$port" up
+}
+
ovs_bridge_validate_datapath_id() {
local dpid="$1"