diff options
author | cy <cy@FreeBSD.org> | 2016-09-20 10:30:45 +0800 |
---|---|---|
committer | cy <cy@FreeBSD.org> | 2016-09-20 10:30:45 +0800 |
commit | c077f9ae1649384d541ab72f517bb3a41830e7ba (patch) | |
tree | 32ddb4a7ef9fed52c6fab3075489c0aedd7edd87 /net/vtun/files | |
parent | 45d9c87a8d37c255eeb829003c608a0dbaa476ef (diff) | |
download | freebsd-ports-gnome-c077f9ae1649384d541ab72f517bb3a41830e7ba.tar.gz freebsd-ports-gnome-c077f9ae1649384d541ab72f517bb3a41830e7ba.tar.zst freebsd-ports-gnome-c077f9ae1649384d541ab72f517bb3a41830e7ba.zip |
Update 3.0.3 --> 3.0.4
Document GPLv2 license.
Convert to USES=ssl
Replace absolute link with a relative link.
Diffstat (limited to 'net/vtun/files')
-rw-r--r-- | net/vtun/files/extra-cfg_file.y | 11 | ||||
-rw-r--r-- | net/vtun/files/patch-main.c | 70 |
2 files changed, 16 insertions, 65 deletions
diff --git a/net/vtun/files/extra-cfg_file.y b/net/vtun/files/extra-cfg_file.y deleted file mode 100644 index ce727b16e65a..000000000000 --- a/net/vtun/files/extra-cfg_file.y +++ /dev/null @@ -1,11 +0,0 @@ ---- cfg_file.y.orig 2012-07-09 09:01:08.000000000 +0800 -+++ cfg_file.y 2013-02-12 11:33:52.000000000 +0800 -@@ -609,7 +609,7 @@ - } - - /* Clear the VTUN_NAT_HACK flag which are not relevant to the current operation mode */ --inline void clear_nat_hack_flags(int svr) -+void clear_nat_hack_flags(int svr) - { - if (svr) - llist_trav(&host_list,clear_nat_hack_server,NULL); diff --git a/net/vtun/files/patch-main.c b/net/vtun/files/patch-main.c index 5ab2ffb176e0..2596ad1de7e8 100644 --- a/net/vtun/files/patch-main.c +++ b/net/vtun/files/patch-main.c @@ -1,6 +1,15 @@ ---- main.c.orig 2012-07-07 22:32:57.000000000 -0700 -+++ main.c 2012-09-26 13:37:53.331700962 -0700 -@@ -50,12 +50,14 @@ +--- 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 @@ + + #define OPTSTRING "mif:P:L:t:npq" + #ifdef HAVE_WORKING_FORK +-# define SERVOPT_STRING "s" ++# define SERVOPT_STRING "sz:" + #else + # define SERVOPT_STRING "" + #endif +@@ -57,6 +57,8 @@ extern int optind,opterr,optopt; extern char *optarg; @@ -9,54 +18,19 @@ /* for the NATHack bit. Is our UDP session connected? */ int is_rmt_fd_connected=1; - int main(int argc, char *argv[], char *env[]) - { -- int svr, daemon, sock, dofork, fd, opt; -+ int svr, daemon, sock, dofork, fd, opt, has_pid = 0; - struct vtun_host *host = NULL; - struct sigaction sa; - char *hst; -@@ -92,7 +94,7 @@ - /* Start logging to syslog and stderr */ - openlog("vtund", LOG_PID | LOG_NDELAY | LOG_PERROR, LOG_DAEMON); - -- while( (opt=getopt(argc,argv,"misf:P:L:t:npq")) != EOF ){ -+ while( (opt=getopt(argc,argv,"misf:P:L:t:npz:")) != EOF ){ - switch(opt){ - case 'm': - if (mlockall(MCL_CURRENT | MCL_FUTURE) < 0) { -@@ -126,6 +128,10 @@ +@@ -141,6 +143,11 @@ case 'q': vtun.quiet = 1; break; ++#ifdef HAVE_WORKING_FORK + case 'z': + pidfile = strdup(optarg); -+ has_pid = 1; + break; ++#endif default: usage(); exit(1); -@@ -200,12 +206,19 @@ - - init_title(argc,argv,env,"vtund[s]: "); - -+ if ( has_pid ) -+ write_pid(); -+ - if( vtun.svr_type == VTUN_STAND_ALONE ) - write_pid(); - - server(sock); - } else { - init_title(argc,argv,env,"vtund[c]: "); -+ -+ if ( has_pid ) -+ write_pid(); -+ - client(host); - } - -@@ -222,7 +235,7 @@ +@@ -250,7 +257,7 @@ { FILE *f; @@ -65,15 +39,3 @@ vtun_syslog(LOG_ERR,"Can't write PID file"); return; } -@@ -244,9 +257,9 @@ - printf("VTun ver %s\n", VTUN_VER); - printf("Usage: \n"); - printf(" Server:\n"); -- printf("\tvtund <-s> [-f file] [-P port] [-L local address]\n"); -+ printf("\tvtund <-s> [-f file] [-P port] [-L local address] [-z pidfile]\n"); - printf(" Client:\n"); - /* I don't think these work. I'm disabling the suggestion - bish 20050601*/ - printf("\tvtund [-f file] " /* [-P port] [-L local address] */ -- "[-p] [-m] [-t timeout] <host profile> <server address>\n"); -+ "[-p] [-m] [-t timeout] [-z pidfile] <host profile> <server address>\n"); - } |