[Patch] Allows tun_mainloop to handle multiple packets in single read.

David Woodhouse dwmw2 at infradead.org
Tue Nov 22 11:53:30 EST 2011


On Wed, 2011-11-23 at 01:43 +0900, Kazuyoshi Aizawa wrote:
> [Summary of patch]
> Modified tun_mainloop and enabled it to handle multiple packets
> included in single read.
> I believe this code is safe for other OS environments, but just in
> case, I isolated the code within ifdef __sun__ satatement.

Hello Kazuyoshi-san,

Thanks for this patch. Is it tested with IPv6?

Other than that question, it looks sane to me at a *very* quick first
glance; I'm about to go out for the evening so will look more closely
later.

I installed a bunch of *BSD virtual machines, along with OpenIndiana,
for testing the 3.14 release so I should be able to test that it's OK to
remove the #ifdef __sun__.

By the way, do you have any thoughts on
https://plus.google.com/113990329890790578682/posts/5qpUJD3ukXV

I'll cite parts of the forum post since Oracle's forums have been down
for the last few days...

https://forums.oracle.com/forums/thread.jspa?threadID=2311191
CSTP connected. DPD 30, Keepalive 20
open /dev/tun: No such file or directory
Set up tun device failed

I did install previously "Universal TUN/TAP device driver(i386)
1.1,REV=2010.11.09.10.19+" using a tuntap-5.11-i386.1.1.pkg. I ende with
"Installation of <tuntap> was successful."
I tried to install also the one suggested by the page referenced by you,
but the 'make install' ended up in a warning:
Driver (tun) successfully added to system but failed to attach

root at isol:~/Downloads/kaizawa-tuntap-6ddbe04# make install
/usr/bin/ginstall -c -d -m 0755 -o root -g bin /usr/include/net
/usr/bin/ginstall -c -d -m 0755 -o root -g sys /usr/kernel/drv/amd64
/usr/bin/ginstall -c -m 644 -o root -g root if_tun.h /usr/include/net 
/usr/bin/ginstall -c -m 644 -o root -g root tun /usr/kernel/drv/amd64
/usr/bin/ginstall -c -m 644 -o root -g root tap /usr/kernel/drv/amd64
/usr/bin/ginstall -c -m 644 -o root -g root tun.conf /usr/kernel/drv
/usr/bin/ginstall -c -m 644 -o root -g root tap.conf /usr/kernel/drv
[ -z "" ]&& /usr/sbin/rem_drv tun >/dev/null 2>&1
[ -z "" ]&& /usr/sbin/rem_drv tap >/dev/null 2>&1
[ -z "" ]&& /usr/sbin/add_drv tun 
devfsadm: driver failed to attach: tun
Warning: Driver (tun) successfully added to system but failed to attach
[ -z "" ]&& /usr/sbin/add_drv tap
devfsadm: driver failed to attach: tap
Warning: Driver (tap) successfully added to system but failed to attach
root at isol:~/Downloads/kaizawa-tuntap-6ddbe04# 

If I do:
root at isol:~# /usr/sbin/add_drv -v tun
Driver (tun) is already installed.
root at isol:~# /usr/sbin/add_drv -v tap
Driver (tap) is already installed.

The user had previously installed 
-- 
dwmw2




More information about the openconnect-devel mailing list