]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
runqemu-ifup: remove only our taps
authorAdrian Freihofer <adrian.freihofer@gmail.com>
Thu, 22 Jun 2023 17:01:24 +0000 (19:01 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 24 Jun 2023 11:19:52 +0000 (12:19 +0100)
If there are other tap interfaces than the interfaces created by the
runqemu-* scripts, these interfaces are not ignored. This is now fixed
by filtering the interfaces for a specific prefix in the interface name.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu-ifup

index fe4492e78b71463c391c22e5f2b67b37d1a9606a..c65ceaf1c839f4d10b87443dc32fd4c2534c36e0 100755 (executable)
@@ -45,7 +45,7 @@ if [ -z "$OE_TAP_NAME" ]; then
 fi
 
 if taps=$(ip tuntap list 2>/dev/null); then
-       tap_no_last=$(echo "$taps" |cut -f 1 -d ":" |sed "s/$OE_TAP_NAME//g" | sort -rn | head -n 1)
+       tap_no_last=$(echo "$taps" |cut -f 1 -d ":" |grep -E "^$OE_TAP_NAME.*" |sed "s/$OE_TAP_NAME//g" | sort -rn | head -n 1)
        if [ -z "$tap_no_last" ]; then
                tap_no=0
        else