diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-10-15 15:44:39 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-10-15 15:44:39 +0000 |
commit | e5c71fccdb99bc361f184598a7461ac64e0b85b0 (patch) | |
tree | 4181f61c8d71dce4b1df3d9cf6a89db5a3ff54b1 | |
parent | 57eccdf5887de9e3e4f20cadcd4c4607435e15ba (diff) | |
download | upstream-e5c71fccdb99bc361f184598a7461ac64e0b85b0.tar.gz upstream-e5c71fccdb99bc361f184598a7461ac64e0b85b0.tar.bz2 upstream-e5c71fccdb99bc361f184598a7461ac64e0b85b0.zip |
add protection for bridging interface changes
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5115 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-x | package/base-files/default/sbin/ifup | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/package/base-files/default/sbin/ifup b/package/base-files/default/sbin/ifup index c7055d4807..35b2fc4cdd 100755 --- a/package/base-files/default/sbin/ifup +++ b/package/base-files/default/sbin/ifup @@ -10,5 +10,12 @@ case "$iftype" in esac for dev in $ifname; do + brctl show | grep "$dev" >/dev/null && { + # interface is still part of a bridge, correct that + + for brdev in $(brctl show | awk '$2 ~ /^[0-9].*\./ { print $1 }'); do + brctl delif "$brdev" "$dev" 2>/dev/null >/dev/null + done + } setup_interface "$dev" "$1" done |