Mac adresses are assigned in the order given by the port list. The interfaces are also brought up in this order. This target supports devices with up to 52 ports. Sorting these alphabetically is very confusing, and assigning mac addresses in alphabetic order does not match stock firmware behaviour.
There are probably better ways to do the numrical sorting, but this was what I came up with... Signed-off-by: Bjørn Mork <[email protected]> --- target/linux/realtek/base-files/etc/board.d/02_network | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network index 44f1f0a7a5c1..06293174b0df 100644 --- a/target/linux/realtek/base-files/etc/board.d/02_network +++ b/target/linux/realtek/base-files/etc/board.d/02_network @@ -17,10 +17,7 @@ ucidef_set_poe() { board=$(board_name) board_config_update -lan_list="" -for lan in /sys/class/net/lan*; do - lan_list="$lan_list $(basename $lan)" -done +lan_list=$(for lan in /sys/class/net/lan*; do echo "${lan#/sys/class/net/lan}"; done|sort -n|sed -e 's/^/lan/'|xargs) ucidef_set_bridge_device switch ucidef_set_interface_lan "$lan_list" -- 2.20.1 _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
