NetBSD platform cleanup
Hi,
testing today's "master" for problems due to the SVN merger (what bit ecrist on FreeBSD), I noticed a number of problems on NetBSD with the way tun/tap devices are handled, and (not) cleaned up at session end.
The attached patch cleans up the tun.c code for NetBSD, and has been tested with IPv4 + IPv6, TUN mode, TUN/top-subnet mode and TAP mode, and passes all tests *except* TAP+IPv6 (and that one seems to be a NetBSD kernel side issue, still investigating).
David, please ACK and merge :-)
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...From e5c787261e973ee0638b940f6b4f0e7767890e00 Mon Sep 17 00:00:00 2001
From: Gert Doering <[email protected]...>
Date: Fri, 16 Sep 2011 19:51:09 +0200
Subject: [PATCH] platform cleanup for NetBSD:
make TAP devices work (need to go via multiplex device /dev/tap) cleanup TUN devices at program end ("ifconfig tunX destroy") correctly setup TUN devices for "topology subnet"
don't try to put TAP devices into TUNSIFHEAD mode (get rid of error message)
tested on NetBSD 5.1_STABLE / Sparc64
--- syshead.h | 4 +++ tun.c | 84 +++++++++++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 72 insertions(+), 16 deletions(-)
syshead.h +4 -0
@@ -207,6 +207,10 @@#include <net/if.h> #endif +#ifdef TARGET_NETBSD +#include <net/if_tap.h> +#endif +#ifdef TARGET_LINUX #if defined(HAVE_NETINET_IF_ETHER_H )
tun.c +68 -16
120 lines not on this page · raw message
Signature · 1 line
1.6.4
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 6 lines · Gert Doering
Hi,
testing today's "master" for problems due to the SVN merger (what bit ecrist on FreeBSD), I noticed a number of problems on NetBSD with the way tun/tap devices are handled, and (not) cleaned up at session end.
Quoted 7 lines
The attached patch cleans up the
tun.ccode for NetBSD, and has been tested with IPv4 + IPv6, TUN mode, TUN/top-subnet mode and TAP mode, and passes all tests *except* TAP+IPv6 (and that one seems to be a NetBSD kernel side issue, still investigating).David, please ACK and merge :-)
ACK. Applied to testing and stable master branches. commit 8ca19c014c149cf69257798afa6c75d1ff8f11a7
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAk555jUACgkQDC186MBRfrq4QQCaApUgHs7lVi9hPDFwfN7aarp3 H7wAoLF7l7SY7hdcT047SIy6HsxZmWPz
=WCZq
-----END PGP SIGNATURE-----