summaryrefslogtreecommitdiff
path: root/target
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
commitfaabe8e8e60f6100bf7611800676973928e8cced (patch)
treecabe44fe56a9f1425fc4433176c05948a3131e33 /target
parent8ddca59465099759db530b1a4e31229ed4333482 (diff)
downloadmtk-20170518-faabe8e8e60f6100bf7611800676973928e8cced.zip
mtk-20170518-faabe8e8e60f6100bf7611800676973928e8cced.tar.gz
mtk-20170518-faabe8e8e60f6100bf7611800676973928e8cced.tar.bz2
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> SVN-Revision: 47326
Diffstat (limited to 'target')
-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 e90ecbe..7b3e225 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