vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

commit aff39c5e39f41bf6e06f9674de4741e40212742a
parent 3bb63c4b773220f29080a98563b88a2ad9b55f93
Author: Jesus Galan Lopez (yiyus) <yiyu.jgl@gmail.com>
Date:   Tue, 15 Jun 2010 18:39:30 +0200

9vx-tap script

Diffstat:
src/9vx/9vx-tap | 27+++++++++++++++++++++++++++
src/9vx/ethertap.c | 1-
2 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/src/9vx/9vx-tap b/src/9vx/9vx-tap @@ -0,0 +1,27 @@ +#!/bin/sh + +USERID=`whoami` + +# Create the tap device with tunctl +IFACE=`sudo tunctl -b -u $USERID` +# or openvpn +#IFACE=tap0 +#sudo openvpn --mktun --dev $IFACE --user $USERID + +# Bring the tap device up +sudo /sbin/ifconfig $IFACE 0.0.0.0 up + +# Add it to the bridge +sudo /usr/sbin/brctl addif br0 $IFACE + +# Launch 9vx (use -F to not fork) +9vx -F -n tap $IFACE $* + +# Bring the tap device down and disconnect from br0 +sudo /sbin/ifconfig $IFACE down +sudo /usr/sbin/brctl delif br0 $IFACE + +# Remove the tap device with tunctl +sudo tunctl -d $IFACE &> /dev/null +# or openvpn +#sudo openvpn --rmtun --dev $1 diff --git a/src/9vx/ethertap.c b/src/9vx/ethertap.c @@ -156,7 +156,6 @@ tapifstat(Ether *e, void *a, long n, ulong offset) static void tapattach(Ether* e) { -iprint("XXX tapattach\n"); kproc("taprecv", taprecvkproc, e); }