Browse Source

malta: make eth0 the wan interface by default

Many packages for OpenWrt currently assume that lan is the "internal"
side of the network map, e.g. if installed, dnsmasq will hand out DHCP
leases on lan, firewall will allow forwarding on lan.

While at it, also configure a lan interface if eth1 exists.

Signed-off-by: Yousong Zhou <[email protected]>

SVN-Revision: 47326
Felix Fietkau 10 years ago
parent
commit
faabe8e8e6
1 changed files with 4 additions and 1 deletions
  1. 4 1
      target/linux/malta/base-files/etc/uci-defaults/02-network

+ 4 - 1
target/linux/malta/base-files/etc/uci-defaults/02-network

@@ -3,4 +3,7 @@
 . /lib/functions/uci-defaults.sh
 
 ucidef_set_interface_loopback
-ucidef_set_interface_raw "lan" "eth0" "dhcp"
+ucidef_set_interface_wan "eth0"
+if [ -d "/sys/class/net/eth1" ]; then
+	ucidef_set_interface_lan "eth1"
+fi