mvebu: fix Linksys WRT LAN/WAN MAC addresses
authorDENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Wed, 21 Aug 2019 14:40:48 +0000 (22:40 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 1 Sep 2019 16:38:04 +0000 (18:38 +0200)
According to 02_network, eth0.1 is LAN and eth1.2 is WAN,
but $mac_wan was assigned incorrectly to eth0 in preinit.

Swap eth0 and eth1 to fix this.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac

index aba8da239ed420779e6d21bdd247be9dcbdbd179..fd41836c8d4a4d60e0e136443b317eeab69284e3 100644 (file)
@@ -21,8 +21,8 @@ preinit_set_mac_address() {
 
                mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
                mac_wan=$(macaddr_setbit_la "$mac")
-               ip link set dev eth1 address $mac 2>/dev/null
-               ip link set dev eth0 address $mac_wan 2>/dev/null
+               ip link set dev eth0 address $mac 2>/dev/null
+               ip link set dev eth1 address $mac_wan 2>/dev/null
                ;;
        linksys,mamba)
                mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)