pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/net/vtun vtun: update to 3.0.4



details:   https://anonhg.NetBSD.org/pkgsrc/rev/39c28ded2dcf
branches:  trunk
changeset: 450692:39c28ded2dcf
user:      nia <nia%pkgsrc.org@localhost>
date:      Wed Apr 21 07:36:24 2021 +0000

description:
vtun: update to 3.0.4

3.0.4
        bug53 - Race condition in socket() vs syslog (AH)
        patch23 - check for fork and work around lack (AM)
        patch22 - static declarations where possible (AM)
        patch21 - fix up configure.in for newer autoheader (AM)

diffstat:

 net/vtun/Makefile                     |   15 ++-
 net/vtun/distinfo                     |   16 ++--
 net/vtun/patches/patch-ab             |   28 -------
 net/vtun/patches/patch-configure      |    3 +-
 net/vtun/patches/patch-lfd__encrypt.c |  127 ++++++++++-----------------------
 net/vtun/patches/patch-vtund.8        |   34 +++++++++
 6 files changed, 91 insertions(+), 132 deletions(-)

diffs (truncated from 386 to 300 lines):

diff -r b6c65b206cb8 -r 39c28ded2dcf net/vtun/Makefile
--- a/net/vtun/Makefile Wed Apr 21 07:23:47 2021 +0000
+++ b/net/vtun/Makefile Wed Apr 21 07:36:24 2021 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.57 2020/03/20 11:58:12 nia Exp $
+# $NetBSD: Makefile,v 1.58 2021/04/21 07:36:24 nia Exp $
 
-DISTNAME=      vtun-3.0.3
-PKGREVISION=   4
+DISTNAME=      vtun-3.0.4
 CATEGORIES=    net
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=vtun/}
 
@@ -10,6 +9,10 @@
 COMMENT=       Virtual Tunnels over TCP/IP networks with traffic shaping
 LICENSE=       gnu-gpl-v2
 
+.include "../../mk/bsd.prefs.mk"
+
+BUILD_DEFS+=   VARBASE
+
 GNU_CONFIGURE=         yes
 CONFIGURE_ARGS+=       --localstatedir=${VARBASE}
 CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR}
@@ -35,9 +38,10 @@
 
 SUBST_CLASSES+=                fix-man
 SUBST_STAGE.fix-man=   pre-configure
-SUBST_MESSAGE.fix-man= Fixing man pages.
+SUBST_MESSAGE.fix-man= Fixing paths in man pages.
 SUBST_FILES.fix-man=   vtund.8
-SUBST_VARS.fix-man=    PKG_SYSCONFDIR
+SUBST_VARS.fix-man+=   PKG_SYSCONFDIR
+SUBST_VARS.fix-man+=   VARBASE
 
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/vtund ${DESTDIR}${PREFIX}/sbin
@@ -48,7 +52,6 @@
        ${INSTALL_MAN} ${WRKSRC}/vtund.conf.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
        ${INSTALL_MAN} ${WRKSRC}/vtund.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
 
-.include "../../mk/bsd.prefs.mk"
 .if ${OPSYS} == "SunOS"
 .include "../../net/solaris-tap/buildlink3.mk"
 .endif
diff -r b6c65b206cb8 -r 39c28ded2dcf net/vtun/distinfo
--- a/net/vtun/distinfo Wed Apr 21 07:23:47 2021 +0000
+++ b/net/vtun/distinfo Wed Apr 21 07:36:24 2021 +0000
@@ -1,12 +1,12 @@
-$NetBSD: distinfo,v 1.15 2019/10/03 12:11:43 kardel Exp $
+$NetBSD: distinfo,v 1.16 2021/04/21 07:36:24 nia Exp $
 
-SHA1 (vtun-3.0.3.tar.gz) = 7937e46420b5c2323f36774ab22e75e11c12da6c
-RMD160 (vtun-3.0.3.tar.gz) = 4df179b523798930927103a4d91b428f941e25ed
-SHA512 (vtun-3.0.3.tar.gz) = 5fa789d08b556f97492b89515a89c2322c4b0a8fa95bd1035f5ed19061b3654a6a36a9911792096ac872ae9ae5451848cab87d0343dc0ffc064affea1f7d0d54
-Size (vtun-3.0.3.tar.gz) = 130051 bytes
+SHA1 (vtun-3.0.4.tar.gz) = 2335c21b56fadf9ce851dd7f342fb0ed4f522c47
+RMD160 (vtun-3.0.4.tar.gz) = 004f2fa3a583b579706a1bc8728108ce9e4bca6e
+SHA512 (vtun-3.0.4.tar.gz) = b1bb7294bd745c2ca888704e2b0f8e05447b5e01bec0f921648afe363d61a19508dea9e26663993cd69c506aa92621e76f36045bddf7c3723d13a72741ca6781
+Size (vtun-3.0.4.tar.gz) = 132691 bytes
 SHA1 (patch-aa) = 2f570c4599923edeef31c6a2e7153f1fe05887c9
-SHA1 (patch-ab) = 0af65f6b6d061d8beb8b2ac6a676ca095c057ccf
 SHA1 (patch-ac) = 0f39700ab729d9481fe29e2d7e53566eff6add96
-SHA1 (patch-configure) = 591ecb4242b0d3bb2eb0087a37315a322222312d
-SHA1 (patch-lfd__encrypt.c) = dfe926ec896cfe913f3a2c75045bb9f3441b0569
+SHA1 (patch-configure) = 61931fea19255c00749b1f768e4657ce8088328a
+SHA1 (patch-lfd__encrypt.c) = d5268b00487ba9da897893eef4a643c82938b76a
 SHA1 (patch-vtun.h) = 832d3b97094885c8a10e752c7c8f5c86e08de967
+SHA1 (patch-vtund.8) = 4082c4e724b4edb5a6d6f7c456d160f86e717f56
diff -r b6c65b206cb8 -r 39c28ded2dcf net/vtun/patches/patch-ab
--- a/net/vtun/patches/patch-ab Wed Apr 21 07:23:47 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-$NetBSD: patch-ab,v 1.2 2011/03/18 10:39:08 adam Exp $
-
---- vtund.8.orig       2007-06-29 05:26:43.000000000 +0000
-+++ vtund.8
-@@ -71,7 +71,7 @@ to any kernel parts. 
- .I -f file 
- Read config information from the
- .I file
--(full path required). By default vtund uses /etc/vtund.conf
-+(full path required). By default vtund uses @PKG_SYSCONFDIR@/vtund.conf
- .TP
- .I -n 
- Do not become daemon.
-@@ -118,12 +118,12 @@ Address of the server to connect to. Eit
- specified.
- .SH FILES
- .TP
--.B /etc/vtund.conf
-+.B @PKG_SYSCONFDIR@/vtund.conf
- Main configuration file with sessions and other information. 
- See vtund.conf example provided with distribution and vtund.conf(5) 
- for more information.
- .TP
--.B /var/lock/vtund/
-+.B /var/run/vtund/
- Session lock files. 
- .TP
- .B /var/log/vtund/
diff -r b6c65b206cb8 -r 39c28ded2dcf net/vtun/patches/patch-configure
--- a/net/vtun/patches/patch-configure  Wed Apr 21 07:23:47 2021 +0000
+++ b/net/vtun/patches/patch-configure  Wed Apr 21 07:36:24 2021 +0000
@@ -1,6 +1,7 @@
-$NetBSD: patch-configure,v 1.1 2015/01/19 16:10:23 wiedi Exp $
+$NetBSD: patch-configure,v 1.2 2021/04/21 07:36:24 nia Exp $
 
 help configure find blowfish headers from openssl
+
 --- configure.orig     2009-03-29 10:08:48.000000000 +0000
 +++ configure
 @@ -5680,7 +5680,7 @@ echo "$as_me: checking for blowfish Libr
diff -r b6c65b206cb8 -r 39c28ded2dcf net/vtun/patches/patch-lfd__encrypt.c
--- a/net/vtun/patches/patch-lfd__encrypt.c     Wed Apr 21 07:23:47 2021 +0000
+++ b/net/vtun/patches/patch-lfd__encrypt.c     Wed Apr 21 07:36:24 2021 +0000
@@ -1,53 +1,38 @@
-$NetBSD: patch-lfd__encrypt.c,v 1.1 2019/10/03 12:11:43 kardel Exp $
+$NetBSD: patch-lfd__encrypt.c,v 1.2 2021/04/21 07:36:24 nia Exp $
 
 Adjust to compile also with openssl>=1.1
 
---- lfd_encrypt.c.orig 2019-08-23 08:37:39.608971418 +0000
+--- lfd_encrypt.c.orig 2016-10-01 21:27:51.000000000 +0000
 +++ lfd_encrypt.c
-@@ -77,6 +77,11 @@ struct vtun_host *phost;
+@@ -95,11 +95,11 @@ static unsigned long sequence_num;
+ static char * pkey;
+ static char * iv_buf;
+ 
+-static EVP_CIPHER_CTX ctx_enc;        /* encrypt */
+-static EVP_CIPHER_CTX ctx_dec;        /* decrypt */
++static EVP_CIPHER_CTX *ctx_enc;       /* encrypt */
++static EVP_CIPHER_CTX *ctx_dec;       /* decrypt */
  
- extern int send_a_packet;
+-static EVP_CIPHER_CTX ctx_enc_ecb;    /* sideband ecb encrypt */
+-static EVP_CIPHER_CTX ctx_dec_ecb;    /* sideband ecb decrypt */
++static EVP_CIPHER_CTX *ctx_enc_ecb;   /* sideband ecb encrypt */
++static EVP_CIPHER_CTX *ctx_dec_ecb;   /* sideband ecb decrypt */
  
-+static int send_msg(int len, char *in, char **out);
-+static int send_ib_mesg(int *len, char **in);
-+static int recv_msg(int len, char *in, char **out);
-+static int recv_ib_mesg(int *len, char **in);
+ static int send_msg(int len, char *in, char **out);
+ static int recv_msg(int len, char *in, char **out);
+@@ -156,6 +156,11 @@ static int alloc_encrypt(struct vtun_hos
+    EVP_CIPHER_CTX *pctx_enc;
+    EVP_CIPHER_CTX *pctx_dec;
+ 
++   ctx_enc = EVP_CIPHER_CTX_new();
++   ctx_dec = EVP_CIPHER_CTX_new();
++   ctx_enc_ecb = EVP_CIPHER_CTX_new();
++   ctx_dec_ecb = EVP_CIPHER_CTX_new();
 +
- /* out of sync packet threshold before forcing a re-init */ 
- #define MAX_GIBBERISH 10
- #define MIN_GIBBERISH   1
-@@ -95,11 +100,11 @@ unsigned long sequence_num;
- char * pkey;
- char * iv_buf;
- 
--EVP_CIPHER_CTX ctx_enc;       /* encrypt */
--EVP_CIPHER_CTX ctx_dec;       /* decrypt */
-+EVP_CIPHER_CTX *ctx_enc = NULL;       /* encrypt */
-+EVP_CIPHER_CTX *ctx_dec = NULL;       /* decrypt */
- 
--EVP_CIPHER_CTX ctx_enc_ecb;   /* sideband ecb encrypt */
--EVP_CIPHER_CTX ctx_dec_ecb;   /* sideband ecb decrypt */
-+EVP_CIPHER_CTX *ctx_enc_ecb = NULL;   /* sideband ecb encrypt */
-+EVP_CIPHER_CTX *ctx_dec_ecb = NULL;   /* sideband ecb decrypt */
- 
- int prep_key(char **key, int size, struct vtun_host *host)
- {
-@@ -154,6 +159,14 @@ int alloc_encrypt(struct vtun_host *host
     enc_init_first_time = 1;   
     dec_init_first_time = 1;   
  
-+   if (ctx_enc == NULL) {
-+      ctx_enc = EVP_CIPHER_CTX_new(); /* encrypt */
-+      ctx_dec = EVP_CIPHER_CTX_new(); /* decrypt */
-+
-+      ctx_enc_ecb = EVP_CIPHER_CTX_new();     /* sideband ecb encrypt */
-+      ctx_dec_ecb = EVP_CIPHER_CTX_new();     /* sideband ecb decrypt */
-+   }
-+
-    if( !(enc_buf = lfd_alloc(ENC_BUF_SIZE)) ){
-       vtun_syslog(LOG_ERR,"Can't allocate buffer for encryptor");
-       return -1;
-@@ -177,15 +190,15 @@ int alloc_encrypt(struct vtun_host *host
+@@ -182,15 +187,15 @@ static int alloc_encrypt(struct vtun_hos
           keysize = 32;
           sb_init = 1;
           cipher_type = EVP_aes_256_ecb();
@@ -67,7 +52,7 @@
           cipher_type = EVP_aes_256_ecb();
           strcpy(cipher_name,"AES-256-ECB");
        break;      
-@@ -196,14 +209,14 @@ int alloc_encrypt(struct vtun_host *host
+@@ -201,14 +206,14 @@ static int alloc_encrypt(struct vtun_hos
           keysize = 16;
           sb_init=1;
           cipher_type = EVP_aes_128_ecb();
@@ -86,7 +71,7 @@
           cipher_type = EVP_aes_128_ecb();
           strcpy(cipher_name,"AES-128-ECB");
        break;
-@@ -216,16 +229,16 @@ int alloc_encrypt(struct vtun_host *host
+@@ -221,16 +226,16 @@ static int alloc_encrypt(struct vtun_hos
           var_key = 1;
           sb_init = 1;
           cipher_type = EVP_bf_ecb();
@@ -107,7 +92,7 @@
           cipher_type = EVP_bf_ecb();
           strcpy(cipher_name,"Blowfish-256-ECB");
        break;
-@@ -238,16 +251,16 @@ int alloc_encrypt(struct vtun_host *host
+@@ -243,16 +248,16 @@ static int alloc_encrypt(struct vtun_hos
           var_key = 1;
           sb_init = 1;
           cipher_type = EVP_bf_ecb();
@@ -128,7 +113,7 @@
           cipher_type = EVP_bf_ecb();
           strcpy(cipher_name,"Blowfish-128-ECB");
        break;
-@@ -289,10 +302,10 @@ int free_encrypt()
+@@ -294,10 +299,10 @@ static int free_encrypt()
     lfd_free(enc_buf); enc_buf = NULL;
     lfd_free(dec_buf); dec_buf = NULL;
  
@@ -143,7 +128,7 @@
  
     return 0;
  }
-@@ -318,7 +331,7 @@ int encrypt_buf(int len, char *in, char 
+@@ -323,7 +328,7 @@ static int encrypt_buf(int len, char *in
     outlen=len+pad;
     if (pad == blocksize)
        RAND_bytes(in_ptr+len, blocksize-1);
@@ -152,7 +137,7 @@
     *out = enc_buf;
  
     sequence_num++;
-@@ -338,7 +351,7 @@ int decrypt_buf(int len, char *in, char 
+@@ -343,7 +348,7 @@ static int decrypt_buf(int len, char *in
  
     outlen=len;
     if (!len) return 0;
@@ -161,7 +146,7 @@
     recv_ib_mesg(&outlen, &out_ptr);
     if (!outlen) return 0;
     tmp_ptr = out_ptr + outlen; tmp_ptr--;
-@@ -426,13 +439,13 @@ int cipher_enc_init(char * iv)
+@@ -431,13 +436,13 @@ static int cipher_enc_init(char * iv)
        break;
     } /* switch(cipher) */
  
@@ -181,7 +166,7 @@
     if (enc_init_first_time)
     {
        sprintf(tmpstr,"%s encryption initialized", cipher_name);
-@@ -516,13 +529,13 @@ int cipher_dec_init(char * iv)
+@@ -521,13 +526,13 @@ static int cipher_dec_init(char * iv)
        break;
     } /* switch(cipher) */
  
@@ -201,16 +186,7 @@
     if (dec_init_first_time)
     {
        sprintf(tmpstr,"%s decryption initialized", cipher_name);
-@@ -532,7 +545,7 @@ int cipher_dec_init(char * iv)
-    return 0;
- }
- 
--int send_msg(int len, char *in, char **out)
-+static int send_msg(int len, char *in, char **out)
- {
-    char * iv; char * in_ptr;
-    int outlen;
-@@ -554,7 +567,7 @@ int send_msg(int len, char *in, char **o
+@@ -559,7 +564,7 @@ static int send_msg(int len, char *in, c
  
           in_ptr = in - blocksize*2;
           outlen = blocksize*2;
@@ -219,16 +195,7 @@
              &outlen, in_ptr, blocksize*2);
           *out = in_ptr;
           len = outlen;
-@@ -570,7 +583,7 @@ int send_msg(int len, char *in, char **o
-    return len;
- }
- 
--int recv_msg(int len, char *in, char **out)
-+static int recv_msg(int len, char *in, char **out)
- {
-    char * iv; char * in_ptr;
-    int outlen;
-@@ -581,7 +594,7 @@ int recv_msg(int len, char *in, char **o
+@@ -586,7 +591,7 @@ static int recv_msg(int len, char *in, c



Home | Main Index | Thread Index | Old Index