]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
mediatek: filogic: drop dead eth0 MAC assignment on TP-Link BE450 24325/head
authorSemih Baskan <strst.gs@gmail.com>
Mon, 20 Jul 2026 18:31:17 +0000 (21:31 +0300)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Mon, 20 Jul 2026 21:39:52 +0000 (23:39 +0200)
The eth0 assignment never takes effect. 05_set_preinit_iface brings eth0
up in its default case before 10_fix_eth_mac.sh runs, and the kernel
refuses a MAC change on a running interface, so ip link fails with EBUSY.
This script cannot run any earlier either, since it needs /tmp/tp_data
mounted by 09_mount_cfg_part.

Nothing is lost by dropping it: the DSA user ports carry their own
addresses, which the lan1-3 assignments below already take care of, and
br-lan takes its address from them.

Verified on a BE450 running an image built from main: eth0 comes up with
a different random address on every boot regardless of this line, while
lan1-3 and br-lan keep the label MAC across reboots even with no macaddr
in /etc/config/network.

Fixes: 1513da34bb1a ("mediatek: filogic: set eth0 and LAN port MACs on TP-Link BE450")
Signed-off-by: Semih Baskan <strst.gs@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24325
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
target/linux/mediatek/filogic/base-files/lib/preinit/10_fix_eth_mac.sh

index 41bbfd8d19aff430a1ec5cdba24d989ee6c23eaf..c370f8c5fce089f259dedb5c78f81be6a883a803 100644 (file)
@@ -37,7 +37,6 @@ preinit_set_mac_address() {
                ;;
        tplink,be450)
                addr=$(get_mac_binary "/tmp/tp_data/default-mac" 0)
-               ip link set dev eth0 address "$addr"
                ip link set dev lan1 address "$addr"
                ip link set dev lan2 address "$addr"
                ip link set dev lan3 address "$addr"