OK, here's what I've got: diff --git a/bin/tap b/bin/tap index 5131834..fbfe066 100755 --- a/bin/tap +++ b/bin/tap @@ -8,26 +8,26 @@ cmd=$1 shift || fatal $usage user=`whoami`
-# Create the tap device with tunctl -iface=`sudo tunctl -b -u $user` +# Create the tap device with tuntap +`sudo ip tuntap add tap5 mode tap user $user` # or openvpn #iface=tap0 #sudo openvpn --mktun --dev $iface --user $user # Bring the tap device up -sudo /sbin/ifconfig $iface 0.0.0.0 up +sudo ip link set tap5 up # Add it to the bridge -sudo /usr/sbin/brctl addif br0 $iface +sudo ip link set tap5 master br0 # Launch 9vx (use -F to not fork) -$cmd "$@" -F "ether0=type=tap dev=$iface" +$cmd "$@" -F "ether0=type=tap dev=tap5" # Bring the tap device down and disconnect from br0 -sudo /sbin/ifconfig $iface down -sudo /usr/sbin/brctl delif br0 $iface +sudo ip link set tap5 down +sudo ip link set tap5 nomaster -# Remove the tap device with tunctl -sudo tunctl -d $iface &> /dev/null +# Remove the tap device with tuntap +sudo ip tuntap del tap5 &> /dev/null # or openvpn #sudo openvpn --rmtun --dev $1 Running `tap 9vx -r 9front -u glenda`, then `ip/ipconfig` hangs for a while, then it returns "DHCP failed". And on vanilla plan9 it just hangs. FWIW, I got the same result using the old commands from net-tools. And several details: 1. I had to hard-code the tap device name "tap5" because `ip tuntap ...` doesn't return the interface name. 2. I have no idea what 0.0.0.0 is, or where to pass it in. (tried `ip link set tap5 up address 0.0.0.0` but it complained the address was too short). Remy ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T84b4492f91f2abb6-M091abcc56de424937ea9b136 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription