aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib/network/config.sh
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-09-16 14:21:19 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-09-16 14:21:19 +0000
commit7c738992b16f17ddf1262a5555ee42a44618e762 (patch)
treef777f9e67d4fd462af9db189924be9e5f486a8df /package/base-files/files/lib/network/config.sh
parentcf5491727d914e800b544b4d2e3aac62f81e3678 (diff)
downloadupstream-7c738992b16f17ddf1262a5555ee42a44618e762.tar.gz
upstream-7c738992b16f17ddf1262a5555ee42a44618e762.tar.bz2
upstream-7c738992b16f17ddf1262a5555ee42a44618e762.zip
[package] base-files: clear ip addresses on interfaces that are about to be added to a bridge
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17596 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files/lib/network/config.sh')
-rwxr-xr-xpackage/base-files/files/lib/network/config.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh
index bfadf40c89..fbbf0e119b 100755
--- a/package/base-files/files/lib/network/config.sh
+++ b/package/base-files/files/lib/network/config.sh
@@ -123,6 +123,7 @@ prepare_interface() {
append newdevs "$dev"
done
uci_set_state network "$config" device "$newdevs"
+ $DEBUG ifconfig "$iface" 0.0.0.0
$DEBUG brctl addif "br-$config" "$iface"
# Bridge existed already. No further processing necesary
} || {
@@ -131,6 +132,7 @@ prepare_interface() {
$DEBUG brctl addbr "br-$config"
$DEBUG brctl setfd "br-$config" 0
$DEBUG ifconfig "br-$config" up
+ $DEBUG ifconfig "$iface" 0.0.0.0
$DEBUG brctl addif "br-$config" "$iface"
$DEBUG brctl stp "br-$config" $stp
# Creating the bridge here will have triggered a hotplug event, which will