Browse Source

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
Felix Fietkau 19 years ago
parent
commit
73e982ce0c
1 changed files with 6 additions and 0 deletions
  1. 6 0
      package/base-files/files/lib/network/config.sh

+ 6 - 0
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