Browse Source

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>
lilik-openwrt-22.03
Stijn Tintel 3 years ago
committed by Yousong Zhou
parent
commit
596051c77e
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      net/openvswitch/files/openvswitch.init

+ 8
- 0
net/openvswitch/files/openvswitch.init View File

@ -121,6 +121,7 @@ ovs_bridge_port_add() {
} }
ovs-vsctl --may-exist add-port "$name" "$port" ${type:+ -- set interface "$port" type="$type"} ovs-vsctl --may-exist add-port "$name" "$port" ${type:+ -- set interface "$port" type="$type"}
ovs_bridge_port_up "$port"
__port_list="$__port_list ${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"} \ ovs-vsctl --may-exist add-port "$bridge" "$port" ${tag:+tag="$tag"} \
${ofport:+ -- set interface "$port" ofport_request="$ofport"} \ ${ofport:+ -- set interface "$port" ofport_request="$ofport"} \
${type:+ -- set interface "$port" type="$type"} ${type:+ -- set interface "$port" type="$type"}
ovs_bridge_port_up "$port"
__port_list="$__port_list ${port} " __port_list="$__port_list ${port} "
} }
@ -174,6 +176,12 @@ ovs_bridge_port_cleanup() {
done done
} }
ovs_bridge_port_up() {
local port="$1"
ip link set dev "$port" up
}
ovs_bridge_validate_datapath_id() { ovs_bridge_validate_datapath_id() {
local dpid="$1" local dpid="$1"


Loading…
Cancel
Save