ioctl(TUNSETIFF): Device or resource busy


 

ip tuntap add test_tun mode tap user root
ioctl(TUNSETIFF): Device or resource busy

 

#!/bin/sh
set -x

switch=virbr0 

if [ -n "$1" ];then
    ip tuntap add $1 mode tap user `whoami`
    ip link set $1 up
    sleep 0.5s
    ip link set $1 master $switch
    exit 0
else
    echo "Error: no interface specified"
    exit 1
fi

 

原來是test_tun已經存在了

 

 

 ip link del test_tun

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM