Skip to content

Commit

Permalink
realtek: sort the port list numerically
Browse files Browse the repository at this point in the history
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.

Suggested-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
  • Loading branch information
bmork authored and hauke committed Dec 5, 2021
1 parent 4304799 commit afeda4a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions target/linux/realtek/base-files/etc/board.d/02_network
Expand Up @@ -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=$(ls -1 -v -d /sys/class/net/lan* | xargs -n1 basename | xargs)
ucidef_set_bridge_device switch
ucidef_set_interface_lan "$lan_list"

Expand Down

0 comments on commit afeda4a

Please sign in to comment.