diff mbox series

[OpenWrt-Devel] ramips: mt7621: edgerouter-x: fix missing wan interface

Message ID 20200605143748.28826-1-ynezz@true.cz
State Superseded
Headers show
Series [OpenWrt-Devel] ramips: mt7621: edgerouter-x: fix missing wan interface | expand

Commit Message

Petr Štetiar June 5, 2020, 2:37 p.m. UTC
Commit 5acd1ed0be0d ("ramips: mt7621: fix Ubiquiti ER-X ports names and
MAC addresses") didn't only changed naming, but also removed WAN
functionality from eth0 port, which is not desired, so lets add it back.

Cc: Chuanhong Guo <gch981213@gmail.com>
Cc: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Cc: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Fixes: 5acd1ed0be0d ("ramips: mt7621: fix Ubiquiti ER-X ports names and MAC addresses")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---

As in https://openwrt.org/toh/ubiquiti/ubiquiti_edgerouter_x_er-x_ka#switch_ports_for_vlans

 target/linux/ramips/mt7621/base-files/etc/board.d/02_network | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Perry June 5, 2020, 2:48 p.m. UTC | #1
Hello Petr,

I have already created a PR to do just this, for both the ER-X and
ER-X-SFP.  https://github.com/openwrt/openwrt/pull/2961

Perhaps the PR could be merged instead since it handles both devices.

Greets,
Perry

On 6/5/20 4:37 PM, Petr Štetiar wrote:
> Commit 5acd1ed0be0d ("ramips: mt7621: fix Ubiquiti ER-X ports names and
> MAC addresses") didn't only changed naming, but also removed WAN
> functionality from eth0 port, which is not desired, so lets add it back.
> 
> Cc: Chuanhong Guo <gch981213@gmail.com>
> Cc: Adrian Schmutzler <freifunk@adrianschmutzler.de>
> Cc: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
> Fixes: 5acd1ed0be0d ("ramips: mt7621: fix Ubiquiti ER-X ports names and MAC addresses")
> Signed-off-by: Petr Štetiar <ynezz@true.cz>
> ---
> 
> As in https://openwrt.org/toh/ubiquiti/ubiquiti_edgerouter_x_er-x_ka#switch_ports_for_vlans
> 
>  target/linux/ramips/mt7621/base-files/etc/board.d/02_network | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> index ba9f7fb7b613..5b0f7ff2cdef 100755
> --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> @@ -44,7 +44,7 @@ ramips_setup_interfaces()
>  		ucidef_set_interfaces_lan_wan "lan2 lan3 lan4 lan5" "wan"
>  		;;
>  	ubnt,edgerouter-x)
> -		ucidef_set_interface_lan "eth0 eth1 eth2 eth3 eth4"
> +		ucidef_set_interface_lan_wan "eth1 eth2 eth3 eth4" "eth0"
>  		;;
>  	ubnt,edgerouter-x-sfp)
>  		ucidef_set_interface_lan "eth0 eth1 eth2 eth3 eth4 eth5"
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
Adrian Schmutzler June 5, 2020, 2:50 p.m. UTC | #2
On 5 June 2020 16:37:48 CEST, "Petr Štetiar" <ynezz@true.cz> wrote:
>Commit 5acd1ed0be0d ("ramips: mt7621: fix Ubiquiti ER-X ports names and
>MAC addresses") didn't only changed naming, but also removed WAN
>functionality from eth0 port, which is not desired, so lets add it
>back.

Hi Petr, 

as far as I'm concerned, this was/is desired. There has been an older discussion on the list and a more recent PR similar to what you do here:

https://github.com/openwrt/openwrt/pull/2961

I do think that all-LAN is closer to the default configuration, and thus would keep it, but I don't intend to repeat the discussion a third time. 

So, as in the PR, I would not merge this, but won't keep you from doing it if you have a strong preference. There are much more important things to spent time on discussing than this :-) 

Best

Adrian


>
>Cc: Chuanhong Guo <gch981213@gmail.com>
>Cc: Adrian Schmutzler <freifunk@adrianschmutzler.de>
>Cc: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
>Fixes: 5acd1ed0be0d ("ramips: mt7621: fix Ubiquiti ER-X ports names and
>MAC addresses")
>Signed-off-by: Petr Štetiar <ynezz@true.cz>
>---
>
>As in
>https://openwrt.org/toh/ubiquiti/ubiquiti_edgerouter_x_er-x_ka#switch_ports_for_vlans
>
> target/linux/ramips/mt7621/base-files/etc/board.d/02_network | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git
>a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
>b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
>index ba9f7fb7b613..5b0f7ff2cdef 100755
>--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
>+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
>@@ -44,7 +44,7 @@ ramips_setup_interfaces()
> 		ucidef_set_interfaces_lan_wan "lan2 lan3 lan4 lan5" "wan"
> 		;;
> 	ubnt,edgerouter-x)
>-		ucidef_set_interface_lan "eth0 eth1 eth2 eth3 eth4"
>+		ucidef_set_interface_lan_wan "eth1 eth2 eth3 eth4" "eth0"
> 		;;
> 	ubnt,edgerouter-x-sfp)
> 		ucidef_set_interface_lan "eth0 eth1 eth2 eth3 eth4 eth5"
Petr Štetiar June 5, 2020, 3:34 p.m. UTC | #3
Adrian Schmutzler <mail@adrianschmutzler.de> [2020-06-05 16:50:48]:

Hi,

> as far as I'm concerned, this was/is desired. There has been an older discussion on the list

yeah, I barely remember something, but can't find it right now, but IIRC it
was David who explained to you, that removing the WAN port is not that good
idea.

> I do think that all-LAN is closer to the default configuration, and thus
> would keep it, but I don't intend to repeat the discussion a third time. 

Well, as you can see, this new default configuration is seen as regression by
me, because I'm used to have sane default wan/lan setup on devices with more
then single port. It was always like that.

> So, as in the PR, I would not merge this, but won't keep you from doing it
> if you have a strong preference. There are much more important things to
> spent time on discussing than this :-)

Ok, DSA, renaming, all fine with me. You're all doing great work, it's really
nice to see 5.4.43 on ERX, but changing default network configurationsuddenly
after 2 releases (18.06 and 19.07) with just because "all-LAN is closer to the
default configuration" reasoning seems a bit off. So I'm inclined to merge the
Perry's fix.

-- ynezz
diff mbox series

Patch

diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
index ba9f7fb7b613..5b0f7ff2cdef 100755
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -44,7 +44,7 @@  ramips_setup_interfaces()
 		ucidef_set_interfaces_lan_wan "lan2 lan3 lan4 lan5" "wan"
 		;;
 	ubnt,edgerouter-x)
-		ucidef_set_interface_lan "eth0 eth1 eth2 eth3 eth4"
+		ucidef_set_interface_lan_wan "eth1 eth2 eth3 eth4" "eth0"
 		;;
 	ubnt,edgerouter-x-sfp)
 		ucidef_set_interface_lan "eth0 eth1 eth2 eth3 eth4 eth5"