[LEDE-DEV] [RFC 1/2] base-file: use ewan network name for ethernet wan
Mathias Kresin
dev at kresin.me
Sat Sep 10 06:40:20 PDT 2016
It's not possible to add a default config for more than one wan
interface/network having different protos and/or mac addresses set.
Such a configuration is at least required for boards having ethernet
wan and xdsl or ethernet wan and LTE modem in QMI mode.
Rename the existing wan network and uci helper functions to ewan. Add a
new wan network which can be used for xdsl or lte modems. EWAN is not a
standardized name, however it's used by devices from TP-Link, Cisco and
others.
Keep using the wan role name for ewan in ucidef_add_switch to be
compliant with the labels printed on the cases.
This commit should not break existing configs since we still have a wan
network albeit it's intended use case is a different one.
Signed-off-by: Mathias Kresin <dev at kresin.me>
---
.../files/etc/board.d/99-default_network | 2 +-
.../base-files/files/lib/functions/uci-defaults.sh | 19 +++++--
.../network/config/firewall/files/firewall.config | 2 +
target/linux/adm8668/base-files/etc/config/network | 2 +-
.../apm821xx/base-files/etc/board.d/02_network | 2 +-
.../linux/ar71xx/base-files/etc/board.d/02_network | 66 +++++++++++-----------
.../linux/at91/base-files/etc/board.d/02_network | 2 +-
.../linux/ath25/base-files/etc/board.d/02_network | 4 +-
.../brcm47xx/base-files/etc/board.d/01_detect | 12 ++--
.../brcm63xx/base-files/etc/board.d/02_network | 6 +-
.../linux/imx6/base-files/etc/board.d/02_network | 4 +-
.../ipq806x/base-files/etc/board.d/02_network | 2 +-
.../linux/malta/base-files/etc/board.d/02_network | 2 +-
.../mediatek/base-files/etc/board.d/02_network | 2 +-
.../mpc85xx/base-files/etc/board.d/02_network | 4 +-
.../linux/mvebu/base-files/etc/board.d/02_network | 8 +--
.../linux/octeon/base-files/etc/board.d/01_network | 4 +-
.../linux/orion/base-files/etc/board.d/02_network | 2 +-
.../linux/ramips/base-files/etc/board.d/02_network | 10 ++--
19 files changed, 82 insertions(+), 73 deletions(-)
diff --git a/package/base-files/files/etc/board.d/99-default_network b/package/base-files/files/etc/board.d/99-default_network
index d70aa35..618d62e 100755
--- a/package/base-files/files/etc/board.d/99-default_network
+++ b/package/base-files/files/etc/board.d/99-default_network
@@ -10,7 +10,7 @@ board_config_update
json_is_a network object && exit 0
ucidef_set_interface_lan 'eth0'
-[ -d /sys/class/net/eth1 ] && ucidef_set_interface_wan 'eth1'
+[ -d /sys/class/net/eth1 ] && ucidef_set_interface_ewan 'eth1'
board_config_flush
diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh
index a88308b..c100ea0 100755
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -41,7 +41,7 @@ _ucidef_set_interface() {
*)
case "$name" in
lan) proto="static" ;;
- wan) proto="dhcp" ;;
+ ewan) proto="dhcp" ;;
*) proto="none" ;;
esac
;;
@@ -71,19 +71,25 @@ ucidef_set_interface_lan() {
json_select ..
}
-ucidef_set_interface_wan() {
+ucidef_set_interface_ewan() {
json_select_object network
- _ucidef_set_interface wan "$@"
+ _ucidef_set_interface ewan "$@"
json_select ..
}
-ucidef_set_interfaces_lan_wan() {
+ucidef_set_interfaces_lan_ewan() {
local lan_if="$1"
- local wan_if="$2"
+ local ewan_if="$2"
json_select_object network
_ucidef_set_interface lan "$lan_if"
- _ucidef_set_interface wan "$wan_if"
+ _ucidef_set_interface ewan "$ewan_if"
+ json_select ..
+}
+
+ucidef_set_interface_wan() {
+ json_select_object network
+ _ucidef_set_interface wan "$@"
json_select ..
}
@@ -185,6 +191,7 @@ _ucidef_finish_switch_roles() {
fi
json_select ..
+ [ "$role" == "wan" ] && role="ewan"
_ucidef_set_interface "$role" "$devices"
json_select ..
done
diff --git a/package/network/config/firewall/files/firewall.config b/package/network/config/firewall/files/firewall.config
index 749dbec..d83cc98 100644
--- a/package/network/config/firewall/files/firewall.config
+++ b/package/network/config/firewall/files/firewall.config
@@ -15,6 +15,8 @@ config zone
config zone
option name wan
+ list network 'ewan'
+ list network 'ewan6'
list network 'wan'
list network 'wan6'
option input REJECT
diff --git a/target/linux/adm8668/base-files/etc/config/network b/target/linux/adm8668/base-files/etc/config/network
index 5967cdd..724ecba 100644
--- a/target/linux/adm8668/base-files/etc/config/network
+++ b/target/linux/adm8668/base-files/etc/config/network
@@ -12,7 +12,7 @@ config interface lan
option netmask 255.255.255.0
option ip6assign 60
-config interface wan
+config interface ewan
option ifname eth1
option proto dhcp
diff --git a/target/linux/apm821xx/base-files/etc/board.d/02_network b/target/linux/apm821xx/base-files/etc/board.d/02_network
index 3a25709..eaaf935 100755
--- a/target/linux/apm821xx/base-files/etc/board.d/02_network
+++ b/target/linux/apm821xx/base-files/etc/board.d/02_network
@@ -20,7 +20,7 @@ wndr4700)
;;
*)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
;;
esac
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network
index b637113..81858f6 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -42,7 +42,7 @@ cr5000)
ap136-010 |\
ap147-010)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
ucidef_add_switch "switch0" \
"0 at eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6 at eth1"
;;
@@ -52,7 +52,7 @@ ap135-020 |\
tew-823dru |\
tl-wr1043nd-v2 |\
wzr-450hp2)
- ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ucidef_set_interfaces_lan_ewan "eth1" "eth0"
ucidef_add_switch "switch0" \
"0 at eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" "6 at eth0"
;;
@@ -60,13 +60,13 @@ wzr-450hp2)
archer-c5 |\
archer-c7 |\
tl-wdr4900-v2)
- ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ucidef_set_interfaces_lan_ewan "eth1" "eth0"
ucidef_add_switch "switch0" \
"0 at eth1" "2:lan" "3:lan" "4:lan" "5:lan" "6 at eth0" "1:wan"
;;
bsb)
- ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ucidef_set_interfaces_lan_ewan "eth1" "eth0"
ucidef_add_switch "switch0" \
"0 at eth1" "1:lan" "3:lan" # XXX: confirm cpu port!
;;
@@ -105,27 +105,27 @@ rb-2011uias-2hnd)
dir-825-b1|\
tew-673gru)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "5 at eth0"
;;
f9k1115v2)
- ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ucidef_set_interfaces_lan_ewan "eth1" "eth0"
ucidef_add_switch "switch0" \
"2:lan" "3:lan" "4:lan" "5:lan" "6 at eth1" \
"0 at eth0" "1:wan" # XXX: confirm cpu ports!
;;
nbg460n_550n_550nh)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "5 at eth0"
;;
nbg6616 |\
nbg6716)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
ucidef_add_switch "switch0" \
"0 at eth0" "1:lan" "2:lan" "3:lan" "4:lan" \
"5:wan" "6 at eth1"
@@ -134,26 +134,26 @@ nbg6716)
ap143 |\
rb-433 |\
rb-433u)
- ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ucidef_set_interfaces_lan_ewan "eth1" "eth0"
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "5 at eth1"
;;
rb-435g)
- ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ucidef_set_interfaces_lan_ewan "eth1" "eth0"
ucidef_add_switch "switch0" \
"0 at eth1" "1:lan" "2:lan" # XXX: confirm!
;;
rb-450)
- ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ucidef_set_interfaces_lan_ewan "eth1" "eth0"
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "5 at eth1"
;;
rb-450g |\
routerstation-pro)
- ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ucidef_set_interfaces_lan_ewan "eth1" "eth0"
ucidef_add_switch "switch0" \
"0 at eth1" "2:lan:3" "3:lan:2" "4:lan:1"
;;
@@ -168,11 +168,11 @@ wzr-hp-g450h)
;;
rb-951ui-2hnd)
- ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ucidef_set_interfaces_lan_ewan "eth1" "eth0"
;;
rb-493g)
- ucidef_set_interfaces_lan_wan "eth0 eth1.1" "eth1.2"
+ ucidef_set_interfaces_lan_ewan "eth0 eth1.1" "eth1.2"
ucidef_add_switch "switch0" \
"0 at eth0" "1:lan" "2:lan" "3:lan" "4:lan"
ucidef_add_switch "switch1" \
@@ -187,13 +187,13 @@ ap113)
;;
el-m150)
- ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ucidef_set_interfaces_lan_ewan "eth1" "eth0"
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "3 at eth1" # XXX: confirm!
;;
tellstick-znet-lite)
- ucidef_set_interface_wan "eth0"
+ ucidef_set_interface_ewan "eth0"
ucidef_set_interface_raw "wlan" "wlan0" "dhcp"
;;
@@ -216,7 +216,7 @@ tl-wr2543n)
tl-wr841n-v1|\
tl-wr941nd)
ucidef_set_interface_raw "eth" "eth0"
- ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
+ ucidef_set_interfaces_lan_ewan "lan1 lan2 lan3 lan4" "wan"
;;
dir-615-i1 |\
@@ -235,7 +235,7 @@ wnr2200 |\
wnr612-v2 |\
wnr1000-v2 |\
wpn824n)
- ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ucidef_set_interfaces_lan_ewan "eth1" "eth0"
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4 at eth1" # XXX: confirm!
;;
@@ -251,19 +251,19 @@ nanostation-m-xw)
;;
wrt160nl)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4 at eth0"
;;
wzr-hp-g300nh)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "5 at eth0"
;;
cr3000)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
ucidef_add_switch "switch0" \
"0 at eth0" "1:lan:1" "2:lan:4" "3:lan:3" "4:lan:2"
;;
@@ -274,7 +274,7 @@ dir-825-c1)
ucidef_add_switch "switch0" \
"0 at eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
mac=$(mtd_get_mac_ascii nvram "wan_mac")
- [ -n "$mac" ] && ucidef_set_interface_macaddr "wan" "$mac"
+ [ -n "$mac" ] && ucidef_set_interface_macaddr "ewan" "$mac"
;;
mynet-n750)
@@ -282,7 +282,7 @@ mynet-n750)
ucidef_add_switch "switch0" \
"0 at eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
mac=$(mtd_get_mac_ascii devdata "wanmac")
- [ -n "$mac" ] && ucidef_set_interface_macaddr "wan" "$mac"
+ [ -n "$mac" ] && ucidef_set_interface_macaddr "ewan" "$mac"
;;
onion-omega)
@@ -298,7 +298,7 @@ wndr4300)
mac_lan=$(mtd_get_mac_binary caldata 0)
[ -n "$mac_lan" ] && ucidef_set_interface_macaddr "lan" "$mac_lan"
mac_wan=$(mtd_get_mac_binary caldata 6)
- [ -n "$mac_wan" ] && ucidef_set_interface_macaddr "wan" "$mac_wan"
+ [ -n "$mac_wan" ] && ucidef_set_interface_macaddr "ewan" "$mac_wan"
;;
esr900)
@@ -306,7 +306,7 @@ esr900)
ucidef_add_switch "switch0" \
"0 at eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
mac=$(mtd_get_mac_ascii u-boot-env "wanaddr")
- [ -n "$mac" ] && ucidef_set_interface_macaddr "wan" "$mac"
+ [ -n "$mac" ] && ucidef_set_interface_macaddr "ewan" "$mac"
;;
dlan-hotspot |\
@@ -403,17 +403,17 @@ tl-wr720n-v3|\
tl-wr810n |\
wpe72 |\
wrtnode2q)
- ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ucidef_set_interfaces_lan_ewan "eth1" "eth0"
;;
gl-ar300)
- ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ucidef_set_interfaces_lan_ewan "eth1" "eth0"
ucidef_add_switch "switch0" \
"0 at eth1" "1:lan" "2:lan" "3:lan" "4:lan"
;;
jwap230)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
ucidef_add_switch "switch0" \
"0 at eth0" "1:lan" "5:wan" "6 at eth1"
;;
@@ -435,7 +435,7 @@ unifiac-pro)
dr531 |\
wpj531)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
;;
wpj558)
@@ -480,7 +480,7 @@ whr-hp-g300n |\
whr-hp-gn |\
wzr-hp-ag300h |\
zbt-we1526)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
ucidef_add_switch "switch0" \
"0 at eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
;;
@@ -496,12 +496,12 @@ ew-dorin)
;;
ew-dorin-router)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
ucidef_add_switch "switch0" "0 at eth0" "2:lan" "3:lan"
;;
wndr3700)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "5 at eth0"
@@ -539,7 +539,7 @@ wndr3700)
;;
*)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
;;
esac
diff --git a/target/linux/at91/base-files/etc/board.d/02_network b/target/linux/at91/base-files/etc/board.d/02_network
index 52709f6..44874de 100755
--- a/target/linux/at91/base-files/etc/board.d/02_network
+++ b/target/linux/at91/base-files/etc/board.d/02_network
@@ -11,7 +11,7 @@ board_config_update
case "$(at91_board_name)" in
sama5d3_xplained)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
;;
*)
diff --git a/target/linux/ath25/base-files/etc/board.d/02_network b/target/linux/ath25/base-files/etc/board.d/02_network
index b2977f7..a9845a6 100755
--- a/target/linux/ath25/base-files/etc/board.d/02_network
+++ b/target/linux/ath25/base-files/etc/board.d/02_network
@@ -14,10 +14,10 @@ then
elif [ -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/0:00" -o \
-e "/sys/bus/mdio_bus/drivers/Marvell 88E6060/0:10" ];
then
- ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+ ucidef_set_interfaces_lan_ewan "eth0.1" "eth0.2"
elif [ -d /sys/class/net/eth1 ]; then
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
else
ucidef_set_interface_lan "eth0"
diff --git a/target/linux/brcm47xx/base-files/etc/board.d/01_detect b/target/linux/brcm47xx/base-files/etc/board.d/01_detect
index 16b81d4..a503565 100755
--- a/target/linux/brcm47xx/base-files/etc/board.d/01_detect
+++ b/target/linux/brcm47xx/base-files/etc/board.d/01_detect
@@ -67,7 +67,7 @@ detect_by_boardtype() {
case "$boardtype" in
"bcm94710r4")
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
;;
"0x0467")
@@ -84,7 +84,7 @@ detect_by_boardtype() {
# Generic BCM94704
else
- ucidef_set_interface_wan "eth1"
+ ucidef_set_interface_ewan "eth1"
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:lan" "5 at eth0"
@@ -97,7 +97,7 @@ detect_by_boardtype() {
case "$mac" in
$pat)
ucidef_set_interface_macaddr "lan" "$mac"
- ucidef_set_interface_macaddr "wan" "$(macaddr_add "$mac" 1)"
+ ucidef_set_interface_macaddr "ewan" "$(macaddr_add "$mac" 1)"
;;
esac
fi
@@ -105,7 +105,7 @@ detect_by_boardtype() {
# Buffalo WBR-B11 and Buffalo WBR-G54
"bcm94710ap")
- ucidef_set_interface_wan "eth1"
+ ucidef_set_interface_ewan "eth1"
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:lan" "5 at eth0"
;;
@@ -141,7 +141,7 @@ detect_by_model() {
"Asus WL500G" | \
"Asus WL500W" | \
"Microsoft MN-700")
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
;;
"Asus WL500GP V2" | \
@@ -158,7 +158,7 @@ detect_by_model() {
;;
"Dell TrueMobile 2300")
- ucidef_set_interface_wan "eth1"
+ ucidef_set_interface_ewan "eth1"
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "5 at eth0"
;;
diff --git a/target/linux/brcm63xx/base-files/etc/board.d/02_network b/target/linux/brcm63xx/base-files/etc/board.d/02_network
index 83367c1..18d6d46 100755
--- a/target/linux/brcm63xx/base-files/etc/board.d/02_network
+++ b/target/linux/brcm63xx/base-files/etc/board.d/02_network
@@ -55,7 +55,7 @@ rta1025W |\
td-w8900gb |\
usr9108 |\
v2500v_bb)
- ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ucidef_set_interfaces_lan_ewan "eth1" "eth0"
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5 at eth1"
;;
@@ -71,7 +71,7 @@ homehub2a)
dva-g3810bn |\
hg520 |\
neufbox4)
- ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
+ ucidef_set_interfaces_lan_ewan "eth1.1" "eth0"
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t at eth1"
;;
@@ -130,7 +130,7 @@ bcm963268bu_p300)
;;
*)
- ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ucidef_set_interfaces_lan_ewan "eth1" "eth0"
;;
esac
diff --git a/target/linux/imx6/base-files/etc/board.d/02_network b/target/linux/imx6/base-files/etc/board.d/02_network
index cf11f62..a50ca17 100755
--- a/target/linux/imx6/base-files/etc/board.d/02_network
+++ b/target/linux/imx6/base-files/etc/board.d/02_network
@@ -18,10 +18,10 @@ case "$board" in
*gw53xx |\
*gw54xx |\
*gw552x)
- ucidef_set_interfaces_lan_wan 'eth0' 'eth1'
+ ucidef_set_interfaces_lan_ewan 'eth0' 'eth1'
;;
*wandboard)
- ucidef_set_interface_wan 'eth0'
+ ucidef_set_interface_ewan 'eth0'
;;
esac
diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network b/target/linux/ipq806x/base-files/etc/board.d/02_network
index b720455..56d6966 100755
--- a/target/linux/ipq806x/base-files/etc/board.d/02_network
+++ b/target/linux/ipq806x/base-files/etc/board.d/02_network
@@ -33,7 +33,7 @@ ea8500)
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "0t at eth0" "5:wan" "0t at eth0"
ucidef_set_interface_macaddr "lan" "$hw_mac_addr"
- ucidef_set_interface_macaddr "wan" "$hw_mac_addr"
+ ucidef_set_interface_macaddr "ewan" "$hw_mac_addr"
;;
*)
echo "Unsupported hardware. Network interfaces not intialized"
diff --git a/target/linux/malta/base-files/etc/board.d/02_network b/target/linux/malta/base-files/etc/board.d/02_network
index 8f01108..17c484b 100755
--- a/target/linux/malta/base-files/etc/board.d/02_network
+++ b/target/linux/malta/base-files/etc/board.d/02_network
@@ -4,7 +4,7 @@
board_config_update
-ucidef_set_interface_wan "eth0"
+ucidef_set_interface_ewan "eth0"
if [ -d "/sys/class/net/eth1" ]; then
ucidef_set_interface_lan "eth1"
fi
diff --git a/target/linux/mediatek/base-files/etc/board.d/02_network b/target/linux/mediatek/base-files/etc/board.d/02_network
index 1d1b5c0..8837a84 100755
--- a/target/linux/mediatek/base-files/etc/board.d/02_network
+++ b/target/linux/mediatek/base-files/etc/board.d/02_network
@@ -13,7 +13,7 @@ mediatek_setup_interfaces()
eMMC | \
NAND | \
mt7623_evb)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6 at eth0" "5 at eth1"
;;
diff --git a/target/linux/mpc85xx/base-files/etc/board.d/02_network b/target/linux/mpc85xx/base-files/etc/board.d/02_network
index e0a0861..8162eb7 100755
--- a/target/linux/mpc85xx/base-files/etc/board.d/02_network
+++ b/target/linux/mpc85xx/base-files/etc/board.d/02_network
@@ -14,10 +14,10 @@ case "$board" in
tl-wdr4900-v1)
ucidef_add_switch "switch0" \
"0 at eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan"
- ucidef_set_interface_macaddr "wan" "$(mtd_get_mac_binary config 332)"
+ ucidef_set_interface_macaddr "ewan" "$(mtd_get_mac_binary config 332)"
;;
*)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
;;
esac
diff --git a/target/linux/mvebu/base-files/etc/board.d/02_network b/target/linux/mvebu/base-files/etc/board.d/02_network
index 8f633c9..6d4eca5 100755
--- a/target/linux/mvebu/base-files/etc/board.d/02_network
+++ b/target/linux/mvebu/base-files/etc/board.d/02_network
@@ -14,23 +14,23 @@ case "$board" in
armada-385-linksys-caiman|\
armada-385-linksys-cobra|\
armada-385-linksys-shelby)
- ucidef_set_interfaces_lan_wan "eth1" "eth0"
+ ucidef_set_interfaces_lan_ewan "eth1" "eth0"
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "6 at eth1" "4:wan" "5 at eth0"
;;
armada-xp-linksys-mamba)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5 at eth0" "4:wan" "6 at eth1"
;;
armada-385-db-ap)
- ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2"
+ ucidef_set_interfaces_lan_ewan "eth0 eth1" "eth2"
;;
armada-xp-gp)
ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
;;
armada-388-clearfog)
- ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2"
+ ucidef_set_interfaces_lan_ewan "eth0 eth1" "eth2"
;;
*)
ucidef_set_interface_lan "eth0"
diff --git a/target/linux/octeon/base-files/etc/board.d/01_network b/target/linux/octeon/base-files/etc/board.d/01_network
index 851b7e8..b29567e 100755
--- a/target/linux/octeon/base-files/etc/board.d/01_network
+++ b/target/linux/octeon/base-files/etc/board.d/01_network
@@ -9,11 +9,11 @@ board_config_update
case "$(cat /tmp/sysinfo/board_name)" in
erlite)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
;;
*)
- ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ucidef_set_interfaces_lan_ewan "eth0" "eth1"
;;
esac
diff --git a/target/linux/orion/base-files/etc/board.d/02_network b/target/linux/orion/base-files/etc/board.d/02_network
index ab74bf3..fae1068 100755
--- a/target/linux/orion/base-files/etc/board.d/02_network
+++ b/target/linux/orion/base-files/etc/board.d/02_network
@@ -5,7 +5,7 @@
board_config_update
if grep -q lan1 /proc/net/dev; then
- ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
+ ucidef_set_interfaces_lan_ewan "lan1 lan2 lan3 lan4" "wan"
else
ucidef_set_interface_lan "eth0"
fi
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 675dcc9..2b36465 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -9,7 +9,7 @@ ramips_setup_rt3x5x_vlans()
{
if [ ! -x /sbin/swconfig ]; then
# legacy default
- ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+ ucidef_set_interfaces_lan_ewan "eth0.1" "eth0.2"
return
fi
local wanports=""
@@ -24,7 +24,7 @@ ramips_setup_rt3x5x_vlans()
lanports="$port:lan $lanports"
fi
done
- ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+ ucidef_set_interfaces_lan_ewan "eth0.1" "eth0.2"
ucidef_add_switch "rt305x" $lanports $wanports "6 at eth0"
}
@@ -155,7 +155,7 @@ ramips_setup_interfaces()
ur-336un|\
w502u|\
wr6202)
- ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+ ucidef_set_interfaces_lan_ewan "eth0.1" "eth0.2"
;;
br-6475nd)
ucidef_add_switch "switch0" \
@@ -238,7 +238,7 @@ ramips_setup_interfaces()
if [ -n "${RT3X5X}" ]; then
ramips_setup_rt3x5x_vlans
else
- ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+ ucidef_set_interfaces_lan_ewan "eth0.1" "eth0.2"
fi
;;
esac
@@ -372,7 +372,7 @@ ramips_setup_macs()
esac
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
- [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
+ [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "ewan" $wan_mac
}
board_config_update
--
2.7.4
More information about the Lede-dev
mailing list