X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/8a1e72be0a34658cf2d8daecd7a6faf40eac9a3c..dbb9afa67c7f76c2d76de323f37d1e9a64473494:/package/base-files/files/lib/network/config.sh diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh index dfee67491..9b4320507 100755 --- a/package/base-files/files/lib/network/config.sh +++ b/package/base-files/files/lib/network/config.sh @@ -90,8 +90,8 @@ prepare_interface() { [ "br-$config" = "$iface" -o -e "$iface" ] && return 0; ifconfig "$iface" 2>/dev/null >/dev/null && { - # make sure the interface is removed from any existing bridge and brought down - ifconfig "$iface" down + # make sure the interface is removed from any existing bridge and deconfigured + ifconfig "$iface" 0.0.0.0 unbridge "$iface" } @@ -120,7 +120,7 @@ prepare_interface() { $DEBUG brctl setfd "br-$config" 0 $DEBUG ifconfig "br-$config" up $DEBUG brctl addif "br-$config" "$iface" - $DEBUG brctl stp "br-$config" ${stp:-off} + $DEBUG brctl stp "br-$config" ${stp:-0} # Creating the bridge here will have triggered a hotplug event, which will # result in another setup_interface() call, so we simply stop processing # the current event at this point. @@ -232,6 +232,7 @@ setup_interface() { config_get mtu "$config" mtu config_get macaddr "$config" macaddr grep "$iface:" /proc/net/dev > /dev/null && \ + $DEBUG ifconfig "$iface" down && \ $DEBUG ifconfig "$iface" ${macaddr:+hw ether "$macaddr"} ${mtu:+mtu $mtu} up set_interface_ifname "$config" "$iface"