summaryrefslogtreecommitdiff
path: root/package/base-files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-01-17 21:29:53 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-01-17 21:29:53 +0000
commit73e982ce0cf3d1e0ef060238797149813a89ea12 (patch)
tree8302d5860fce48ca4529d3501c356c16263742e0 /package/base-files
parent38912058a092afe32c698146b64821788bee0514 (diff)
downloadmtk-20170518-73e982ce0cf3d1e0ef060238797149813a89ea12.zip
mtk-20170518-73e982ce0cf3d1e0ef060238797149813a89ea12.tar.gz
mtk-20170518-73e982ce0cf3d1e0ef060238797149813a89ea12.tar.bz2
Fix the issue where the default gateway is not set in static mode most of the time. Seems like the bridge is not fast enough at switching to 'forwarding' mode so a short delay before setting the routes is necessary.
SVN-Revision: 6123
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/lib/network/config.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh
index 96890ac..ffce9f6 100755
--- a/package/base-files/files/lib/network/config.sh
+++ b/package/base-files/files/lib/network/config.sh
@@ -97,6 +97,12 @@ setup_interface() {
$DEBUG brctl setfd "br-$config" 0
$DEBUG brctl addif "br-$config" "$iface"
iface="br-$config"
+
+ # need to bring up the bridge and wait a second for
+ # it to switch to the 'forwarding' state, otherwise
+ # it will lose its routes...
+ ifconfig "$iface" up
+ sleep 1
}
;;
esac