aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/malta
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-10-31 09:30:57 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-10-31 09:30:57 +0000
commitb2518869cc2fc1af5e8f9e4bfdeb1a26d5ec4bbd (patch)
tree99f552ae5bff6f7e8080f4ce78b9c929276af1ae /target/linux/malta
parenta6101e62d57a963b18b12119475d9bee2b79af58 (diff)
downloadmaster-187ad058-b2518869cc2fc1af5e8f9e4bfdeb1a26d5ec4bbd.tar.gz
master-187ad058-b2518869cc2fc1af5e8f9e4bfdeb1a26d5ec4bbd.tar.bz2
master-187ad058-b2518869cc2fc1af5e8f9e4bfdeb1a26d5ec4bbd.zip
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 <yszhou4tech@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47326 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/malta')
-rw-r--r--target/linux/malta/base-files/etc/uci-defaults/02-network5
1 files changed, 4 insertions, 1 deletions
diff --git a/target/linux/malta/base-files/etc/uci-defaults/02-network b/target/linux/malta/base-files/etc/uci-defaults/02-network
index e90ecbe6b2..7b3e22540e 100644
--- a/target/linux/malta/base-files/etc/uci-defaults/02-network
+++ b/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