From 596051c77e8470e856ca200686b4fb55359e027a Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Fri, 29 Oct 2021 20:27:56 +0200 Subject: [PATCH] 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 --- net/openvswitch/files/openvswitch.init | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/net/openvswitch/files/openvswitch.init b/net/openvswitch/files/openvswitch.init index f4a88edcfa..abbbbf792b 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"