From owner-svn-ports-all@freebsd.org Tue Sep 20 03:14:37 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6EF9BE1A4E; Tue, 20 Sep 2016 03:14:37 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5674136C; Tue, 20 Sep 2016 03:14:37 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8K3Ea0R087705; Tue, 20 Sep 2016 03:14:36 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8K3EaUQ087702; Tue, 20 Sep 2016 03:14:36 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201609200314.u8K3EaUQ087702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 20 Sep 2016 03:14:36 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r422480 - in head/net/vtun: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 03:14:38 -0000 Author: cy Date: Tue Sep 20 03:14:36 2016 New Revision: 422480 URL: https://svnweb.freebsd.org/changeset/ports/422480 Log: Replace the vtun-v6 extra patch from http://home.jp.FreeBSD.org/~simokawa/vtun-v6.html with a -e option on the command line. Added: head/net/vtun/files/patch-freebsd__tun_dev.c - copied, changed from r422479, head/net/vtun/files/extra-tun_dev.c Deleted: head/net/vtun/files/extra-tun_dev.c Modified: head/net/vtun/Makefile head/net/vtun/files/patch-main.c Modified: head/net/vtun/Makefile ============================================================================== --- head/net/vtun/Makefile Tue Sep 20 02:55:18 2016 (r422479) +++ head/net/vtun/Makefile Tue Sep 20 03:14:36 2016 (r422480) @@ -3,7 +3,7 @@ PORTNAME= vtun PORTVERSION= 3.0.4 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net MASTER_SITES= SF @@ -30,11 +30,11 @@ ALL_TARGET= vtund DOCS= ChangeLog Credits FAQ README README.LZO README.Setup \ README.Shaper TODO -OPTIONS_DEFINE= DOCS EXTENDED_MODE -EXTENDED_MODE_DESC= Use vtun-v6 EXTENDED_MODE patch +OPTIONS_DEFINE= DOCS -# Obtained from http://home.jp.FreeBSD.org/~simokawa/vtun-v6.html -EXTENDED_MODE_EXTRA_PATCHES= ${FILESDIR}/extra-tun_dev.c +# Extended mode patches, obtained from +# http://home.jp.FreeBSD.org/~simokawa/vtun-v6.html +# are now dynamically enabled using the -e option. .include Copied and modified: head/net/vtun/files/patch-freebsd__tun_dev.c (from r422479, head/net/vtun/files/extra-tun_dev.c) ============================================================================== --- head/net/vtun/files/extra-tun_dev.c Tue Sep 20 02:55:18 2016 (r422479, copy source) +++ head/net/vtun/files/patch-freebsd__tun_dev.c Tue Sep 20 03:14:36 2016 (r422480) @@ -1,13 +1,24 @@ ---- freebsd/tun_dev.c.orig Thu Aug 26 16:45:24 2004 -+++ freebsd/tun_dev.c Thu Aug 26 16:45:42 2004 -@@ -58,8 +58,8 @@ +--- freebsd/tun_dev.c.orig 2008-01-07 14:36:10.000000000 -0800 ++++ freebsd/tun_dev.c 2016-09-19 20:06:49.919502000 -0700 +@@ -35,6 +35,8 @@ + #include "vtun.h" + #include "lib.h" + ++extern int extended_mode; ++ + /* + * Allocate TUN device, returns opened fd. + * Stores dev name in the first arg(must be large enough). +@@ -58,10 +60,8 @@ } } if( fd > -1 ){ - i=0; - /* Disable extended modes */ -+ i=1; -+ /* Enable extended modes */ - ioctl(fd, TUNSLMODE, &i); - ioctl(fd, TUNSIFHEAD, &i); +- ioctl(fd, TUNSLMODE, &i); +- ioctl(fd, TUNSIFHEAD, &i); ++ ioctl(fd, TUNSLMODE, &extended_mode); ++ ioctl(fd, TUNSIFHEAD, &extended_mode); } + return fd; + } Modified: head/net/vtun/files/patch-main.c ============================================================================== --- head/net/vtun/files/patch-main.c Tue Sep 20 02:55:18 2016 (r422479) +++ head/net/vtun/files/patch-main.c Tue Sep 20 03:14:36 2016 (r422480) @@ -1,24 +1,28 @@ --- main.c.orig 2013-07-07 13:31:22.000000000 -0700 -+++ main.c 2016-09-19 18:44:42.369746000 -0700 -@@ -41,7 +41,7 @@ ++++ main.c 2016-09-19 20:05:37.120740000 -0700 +@@ -39,9 +39,9 @@ + #include "lib.h" + #include "compat.h" - #define OPTSTRING "mif:P:L:t:npq" +-#define OPTSTRING "mif:P:L:t:npq" ++#define OPTSTRING "mif:P:L:t:npqe" #ifdef HAVE_WORKING_FORK -# define SERVOPT_STRING "s" +# define SERVOPT_STRING "sz:" #else # define SERVOPT_STRING "" #endif -@@ -57,6 +57,8 @@ +@@ -57,6 +57,9 @@ extern int optind,opterr,optopt; extern char *optarg; +static char* pidfile = VTUN_PID_FILE; ++int extended_mode = 0; + /* for the NATHack bit. Is our UDP session connected? */ int is_rmt_fd_connected=1; -@@ -141,6 +143,11 @@ +@@ -141,6 +144,14 @@ case 'q': vtun.quiet = 1; break; @@ -27,10 +31,13 @@ + pidfile = strdup(optarg); + break; +#endif ++ case 'e': ++ extended_mode = 1; ++ break; default: usage(); exit(1); -@@ -250,7 +257,7 @@ +@@ -250,7 +261,7 @@ { FILE *f;