pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc Add support for NetBSD's cloning tap device to support...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0d5fb8258f8c
branches:  trunk
changeset: 511214:0d5fb8258f8c
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Tue Apr 11 20:09:52 2006 +0000

description:
Add support for NetBSD's cloning tap device to support "device tap"
configurations.  Changes supplied in PR pkg/32929 by Alan Barrett.
Bump PKGREVISION to 1.

diffstat:

 doc/CHANGES                  |   3 ++-
 net/openvpn/Makefile         |   3 ++-
 net/openvpn/distinfo         |   7 ++++++-
 net/openvpn/patches/patch-ab |  15 +++++++++++++++
 net/openvpn/patches/patch-ac |  43 +++++++++++++++++++++++++++++++++++++++++++
 net/openvpn/patches/patch-ad |  14 ++++++++++++++
 net/openvpn/patches/patch-ae |  13 +++++++++++++
 net/openvpn/patches/patch-af |  13 +++++++++++++
 8 files changed, 108 insertions(+), 3 deletions(-)

diffs (160 lines):

diff -r 10712ec1f24b -r 0d5fb8258f8c doc/CHANGES
--- a/doc/CHANGES       Tue Apr 11 18:43:29 2006 +0000
+++ b/doc/CHANGES       Tue Apr 11 20:09:52 2006 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.13542 2006/04/11 18:40:59 minskim Exp $
+$NetBSD: CHANGES,v 1.13543 2006/04/11 20:10:23 jlam Exp $
 
 Changes to the packages collection and infrastructure in 2006:
 
@@ -2019,3 +2019,4 @@
        Updated graphics/lib3ds to 1.2.0nb5 [jmmv 2006-04-11]
        Added devel/ko-po-check version 0.5 [minskim 2006-04-11]
        Updated mbone/common-mml to 1.2.16 [minskim 2006-04-11]
+       Updated net/openvpn to 2.0.6nb1 [jlam 2006-04-11]
diff -r 10712ec1f24b -r 0d5fb8258f8c net/openvpn/Makefile
--- a/net/openvpn/Makefile      Tue Apr 11 18:43:29 2006 +0000
+++ b/net/openvpn/Makefile      Tue Apr 11 20:09:52 2006 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.16 2006/04/05 13:49:26 jlam Exp $
+# $NetBSD: Makefile,v 1.17 2006/04/11 20:09:52 jlam Exp $
 #
 
 DISTNAME=      openvpn-2.0.6
+PKGREVISION=   1
 CATEGORIES=    net
 MASTER_SITES=  http://openvpn.net/release/ \
                http://openvpn.net/release/old/
diff -r 10712ec1f24b -r 0d5fb8258f8c net/openvpn/distinfo
--- a/net/openvpn/distinfo      Tue Apr 11 18:43:29 2006 +0000
+++ b/net/openvpn/distinfo      Tue Apr 11 20:09:52 2006 +0000
@@ -1,5 +1,10 @@
-$NetBSD: distinfo,v 1.7 2006/04/05 13:49:26 jlam Exp $
+$NetBSD: distinfo,v 1.8 2006/04/11 20:09:52 jlam Exp $
 
 SHA1 (openvpn-2.0.6.tar.gz) = 046f3811831a06e4fbc9c64544faaecf04547ae5
 RMD160 (openvpn-2.0.6.tar.gz) = cf3cd807bb657baf317e896b57900958cf442a63
 Size (openvpn-2.0.6.tar.gz) = 664816 bytes
+SHA1 (patch-ab) = 05c9df0a7a71cb1cfa4a2f132df02cac822ba3ba
+SHA1 (patch-ac) = 7a225a0b88dcf0039cd40f72a10564c72f41b2f1
+SHA1 (patch-ad) = ee577ad5c5621bbfa05d522e85e467e937929f6e
+SHA1 (patch-ae) = b6f8f869b5c727120df8dd433e54ffe3537e0006
+SHA1 (patch-af) = ae697790e648c4d351c8c99e21ff79a56c572ddf
diff -r 10712ec1f24b -r 0d5fb8258f8c net/openvpn/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/openvpn/patches/patch-ab      Tue Apr 11 20:09:52 2006 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-ab,v 1.4 2006/04/11 20:09:52 jlam Exp $
+
+--- syshead.h.orig     2005-12-08 15:57:49.000000000 -0500
++++ syshead.h
+@@ -254,6 +254,10 @@
+ 
+ #ifdef TARGET_NETBSD
+ 
++#ifdef HAVE_NET_IF_TAP_H
++#include <net/if_tap.h>
++#endif
++
+ #ifdef HAVE_NET_IF_TUN_H
+ #include <net/if_tun.h>
+ #endif
diff -r 10712ec1f24b -r 0d5fb8258f8c net/openvpn/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/openvpn/patches/patch-ac      Tue Apr 11 20:09:52 2006 +0000
@@ -0,0 +1,43 @@
+$NetBSD: patch-ac,v 1.3 2006/04/11 20:09:52 jlam Exp $
+
+--- tun.c.orig 2006-04-05 02:29:24.000000000 -0400
++++ tun.c
+@@ -877,7 +877,37 @@ open_tun_generic (const char *dev, const
+         if (dynamic && !has_digit(dev))
+           {
+             int i;
+-            for (i = 0; i < 256; ++i)
++#if defined(TAPGIFNAME)
++            /*
++             * Perhaps we have a cloning device.  Try opening
++             * the device without any appended digits,
++             * and use ioctl(,TAPGIFNAME,) to get the resulting
++             * interface name.
++             */
++            openvpn_snprintf (tunname, sizeof (tunname), "/dev/%s", dev);
++            if ((tt->fd = open (tunname, O_RDWR)) > 0)
++              {
++                struct ifreq ifr;
++                if (ioctl (tt->fd, TAPGIFNAME, (void*)&ifr) < 0)
++                  {
++                    msg (D_READ_WRITE | M_ERRNO,
++                         "ioctl(,TAPGIFNAME,) failed for %s", tunname);
++                    close(tt->fd);
++                  }
++                else
++                  {
++                    strlcpy (dynamic_name, ifr.ifr_name,
++                             sizeof (dynamic_name));
++                    dynamic_opened = true;
++                    msg (M_INFO, "TUN/TAP dynamic interface %s opened",
++                         dynamic_name);
++                  }
++              }
++            if (!dynamic_opened)
++              msg (D_READ_WRITE | M_ERRNO, "Tried opening %s (failed)",
++                   tunname);
++#endif /* TAPGIFNAME */
++            for (i = 0; i < 256 && !dynamic_opened; ++i)
+               {
+                 openvpn_snprintf (tunname, sizeof (tunname),
+                                   "/dev/%s%d", dev, i);
diff -r 10712ec1f24b -r 0d5fb8258f8c net/openvpn/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/openvpn/patches/patch-ad      Tue Apr 11 20:09:52 2006 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-ad,v 1.1 2006/04/11 20:09:52 jlam Exp $
+
+--- config.h.in.orig   2006-04-05 04:03:07.000000000 -0400
++++ config.h.in
+@@ -201,6 +201,9 @@
+ /* Define to 1 if you have the <net/if.h> header file. */
+ #undef HAVE_NET_IF_H
+ 
++/* Define to 1 if you have the <net/if_tap.h> header file. */
++#undef HAVE_NET_IF_TAP_H
++
+ /* Define to 1 if you have the <net/if_tun.h> header file. */
+ #undef HAVE_NET_IF_TUN_H
+ 
diff -r 10712ec1f24b -r 0d5fb8258f8c net/openvpn/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/openvpn/patches/patch-ae      Tue Apr 11 20:09:52 2006 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1 2006/04/11 20:09:52 jlam Exp $
+
+--- configure.ac.orig  2006-04-05 04:02:59.000000000 -0400
++++ configure.ac
+@@ -266,7 +266,7 @@ AC_CHECK_HEADERS(sys/time.h sys/socket.h
+                sys/mman.h fcntl.h sys/file.h stdlib.h stdint.h dnl
+                stdarg.h unistd.h signal.h stdio.h string.h dnl
+                strings.h ctype.h errno.h syslog.h pwd.h grp.h dnl
+-               net/if_tun.h net/if.h stropts.h sys/sockio.h dnl
++               net/if_tap.h net/if_tun.h net/if.h stropts.h sys/sockio.h dnl
+                netinet/in.h netinet/in_systm.h netinet/ip.h dnl
+                netinet/if_ether.h netinet/tcp.h resolv.h arpa/inet.h dnl
+                netdb.h sys/uio.h linux/if_tun.h linux/sockios.h dnl
diff -r 10712ec1f24b -r 0d5fb8258f8c net/openvpn/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/openvpn/patches/patch-af      Tue Apr 11 20:09:52 2006 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-af,v 1.1 2006/04/11 20:09:52 jlam Exp $
+
+--- configure.orig     2006-04-05 04:03:06.000000000 -0400
++++ configure
+@@ -4881,7 +4881,7 @@ fi
+ 
+ 
+ 
+-for ac_header in sys/time.h sys/socket.h sys/ioctl.h sys/stat.h                sys/mman.h fcntl.h sys/file.h stdlib.h stdint.h                 stdarg.h unistd.h signal.h stdio.h string.h            
 strings.h ctype.h errno.h syslog.h pwd.h grp.h                  net/if_tun.h net/if.h stropts.h sys/sockio.h            netinet/in.h netinet/in_systm.h netinet/ip.h            netinet/if_ether.h 
netinet/tcp.h resolv.h arpa/inet.h           netdb.h sys/uio.h linux/if_tun.h linux/sockios.h                linux/types.h sys/poll.h sys/epoll.h
++for ac_header in sys/time.h sys/socket.h sys/ioctl.h sys/stat.h                sys/mman.h fcntl.h sys/file.h stdlib.h stdint.h                 stdarg.h unistd.h signal.h stdio.h string.h            
 strings.h ctype.h errno.h syslog.h pwd.h grp.h                  net/if_tap.h net/if_tun.h net/if.h stropts.h sys/sockio.h               netinet/in.h netinet/in_systm.h netinet/ip.h            
netinet/if_ether.h netinet/tcp.h resolv.h arpa/inet.h           netdb.h sys/uio.h linux/if_tun.h linux/sockios.h                linux/types.h sys/poll.h sys/epoll.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then



Home | Main Index | Thread Index | Old Index