1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 12:49:46 +00:00

runqemu-ifupdown/get-tapdevs: Add support for ip tuntap

The *ip* command supports the creation and destruction of TAP devices since
2009 and might be more likely installed on systems then *tunctl*. Therefore
it should be tried to setup or teardown the TAP interface with *ip* before
falling back to *tunctl*.

https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=580fbd88f75cc9eea0d28a48c025b090eb9419a7

(From OE-Core rev: 424ede206baae1c228583aab1df6c18513ac104f)

Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Jörg Sommer
2023-06-09 10:51:06 +02:00
committed by Richard Purdie
parent 177886950e
commit d43c41fcaf
3 changed files with 44 additions and 27 deletions
+8 -6
View File
@@ -33,13 +33,15 @@ fi
TAP=$1
STAGING_BINDIR_NATIVE=$2
TUNCTL=$STAGING_BINDIR_NATIVE/tunctl
if [ ! -e "$TUNCTL" ]; then
echo "Error: Unable to find tunctl binary in '$STAGING_BINDIR_NATIVE', please bitbake qemu-helper-native"
exit 1
fi
if !ip tuntap del $TAP mode tap 2>/dev/null; then
TUNCTL=$STAGING_BINDIR_NATIVE/tunctl
if [ ! -e "$TUNCTL" ]; then
echo "Error: Unable to find tunctl binary in '$STAGING_BINDIR_NATIVE', please bitbake qemu-helper-native"
exit 1
fi
$TUNCTL -d $TAP
$TUNCTL -d $TAP
fi
IFCONFIG=`which ip 2> /dev/null`
if [ "x$IFCONFIG" = "x" ]; then