malta: make eth0 the wan interface by default
authorFelix Fietkau <nbd@openwrt.org>
Sat, 31 Oct 2015 09:30:57 +0000 (09:30 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 31 Oct 2015 09:30:57 +0000 (09:30 +0000)
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 <yszhou4tech@gmail.com>
SVN-Revision: 47326

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

index e90ecbe6b25f491c28f542781942142d3d11eb32..7b3e22540e1e0c87d7aa816d373b1c99cb6f994f 100644 (file)
@@ -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