From 53830e315e4314236645eb9c3f84552520639d0f Mon Sep 17 00:00:00 2001 From: nbd Date: Sat, 31 Oct 2015 09:30:57 +0000 Subject: [PATCH] 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 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47326 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/malta/base-files/etc/uci-defaults/02-network | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.35.1