From: Felix Fietkau Date: Wed, 17 Jan 2007 21:29:53 +0000 (+0000) Subject: Fix the issue where the default gateway is not set X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=5e825ee69ee0909d0785f535c8ce1733c46db0e9 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 --- 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