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>
This commit is contained in:
parent
df847e1c03
commit
596051c77e
1 changed files with 8 additions and 0 deletions
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in a new issue