Skip to content
Snippets Groups Projects
Commit 70dbabc9 authored by Tian Yang's avatar Tian Yang
Browse files

rstp: Fix the empty bridge name issue


network_get_device will extract "l3_device" value from
interface's netifd attribute. But when LAN interface is
set to dhcp proto, l3_device is not set. Hence we use
network_get_physdev to get "device" field, which is present
for either dhcp or non-dhcp proto.

Signed-off-by: default avatarTian Yang <quic_tiany@quicinc.com>
Change-Id: Ia44a11100bb6547c59cffcc71ca96e647c1c0295
parent d98bda7a
No related branches found
No related tags found
No related merge requests found
......@@ -183,15 +183,14 @@ board_recover() {
__brctl_stp_on_or_off() {
local config="$1"
local on_or_off="$2"
local type br_device br_ifname
local type br
config_get type "$config" type
[ -z "$type" -o ! "$type" = "bridge" ] && return
br_device="$config"
network_get_device br_ifname $br_device
network_get_physdev br $1
brctl stp $br_ifname $on_or_off
brctl stp $br $on_or_off
sleep 1
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment