]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
scripts: fix lan/wan order of malta in qemustart
authorPaul Spooren <mail@aparcar.org>
Mon, 18 May 2026 17:53:49 +0000 (19:53 +0200)
committerPaul Spooren <mail@aparcar.org>
Thu, 21 May 2026 14:06:25 +0000 (16:06 +0200)
OpenWrt's 99-default_network assigns eth0 to lan and eth1 to wan
when no target-specific 02_network is present, which is the case
for malta.  The qemustart bridge block however placed the wan
-device before the lan -device, so the guest's eth0 (lan) ended
up attached to $BR_WAN and eth1 (wan) to $BR_LAN.

Swap the order to match the guest's actual role assignment.

Link: https://github.com/openwrt/openwrt/pull/23424
Signed-off-by: Paul Spooren <mail@aparcar.org>
scripts/qemustart

index 42d692575d5c78719f2a956e837012da8e04b857..568b35876546d529b3d080662f0a51ffef95fe38 100755 (executable)
@@ -241,8 +241,8 @@ start_qemu_malta() {
        # guest machine
        [ -z "$o_network" ] || {
                o_qemu_extra+=(
-                       -netdev bridge,id=wan,br="$BR_WAN,helper=$HELPER" -device pcnet,netdev=wan,mac="$MAC_WAN"
                        -netdev bridge,id=lan,br="$BR_LAN,helper=$HELPER" -device pcnet,netdev=lan,mac="$MAC_LAN"
+                       -netdev bridge,id=wan,br="$BR_WAN,helper=$HELPER" -device pcnet,netdev=wan,mac="$MAC_WAN"
                )
        }