aboutsummaryrefslogtreecommitdiffstats
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
commitd64e90a6f8bbb960f832ebc42e7791a8a8ae3900 (patch)
tree9882824ec5bd91e32f294df2c1199d3ea4b3d579
parent15d5a8b1c1e14f8c1f1b12e75330c0ffd252617e (diff)
downloadmaster-187ad058-d64e90a6f8bbb960f832ebc42e7791a8a8ae3900.tar.gz
master-187ad058-d64e90a6f8bbb960f832ebc42e7791a8a8ae3900.tar.bz2
master-187ad058-d64e90a6f8bbb960f832ebc42e7791a8a8ae3900.zip
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. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6123 3c298f89-4303-0410-b956-a3cf2f4a3e73
-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 96890acacd..ffce9f6aa3 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