pkgsrc-WIP-changes archive

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

ocserv: Import ocserv-0.11.2 as wip/ocserv



Module Name:	pkgsrc-wip
Committed By:	Jonathan A. Kollasch <jakllsch%kollasch.net@localhost>
Pushed By:	jakllsch
Date:		Sun May 8 08:37:37 2016 -0500
Changeset:	cb8182249d6c95826ccdc0f8413b53c6850b312a

Modified Files:
	Makefile
Added Files:
	ocserv/DESCR
	ocserv/Makefile
	ocserv/PLIST
	ocserv/distinfo
	ocserv/patches/patch-src_ccan_list_list.h
	ocserv/patches/patch-src_main.c
	ocserv/patches/patch-src_tun.c
	ocserv/patches/patch-src_worker-vpn.c

Log Message:
ocserv: Import ocserv-0.11.2 as wip/ocserv

OpenConnect server (ocserv) is an SSL VPN server. Its purpose is
to be a secure, small, fast and configurable VPN server. It implements
the OpenConnect SSL VPN protocol, and has also (currently experimental)
compatibility with clients using the AnyConnect SSL VPN protocol.
The OpenConnect protocol provides a dual TCP/UDP VPN channel, and
uses the standard IETF security protocols to secure it. The server
is implemented primarily for the GNU/Linux platform but its code
is designed to be portable to other UNIX variants as well.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=cb8182249d6c95826ccdc0f8413b53c6850b312a

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                  |  1 +
 ocserv/DESCR                              |  8 +++++++
 ocserv/Makefile                           | 29 +++++++++++++++++++++++++
 ocserv/PLIST                              |  8 +++++++
 ocserv/distinfo                           | 10 +++++++++
 ocserv/patches/patch-src_ccan_list_list.h | 31 ++++++++++++++++++++++++++
 ocserv/patches/patch-src_main.c           | 13 +++++++++++
 ocserv/patches/patch-src_tun.c            | 30 ++++++++++++++++++++++++++
 ocserv/patches/patch-src_worker-vpn.c     | 36 +++++++++++++++++++++++++++++++
 9 files changed, 166 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index e0c22aa..0b220cf 100644
--- a/Makefile
+++ b/Makefile
@@ -2134,6 +2134,7 @@ SUBDIR+=	ocaml-yojson
 SUBDIR+=	ocaml-zed
 SUBDIR+=	ocamlweb
 SUBDIR+=	oce
+SUBDIR+=	ocserv
 SUBDIR+=	octave
 SUBDIR+=	ode
 SUBDIR+=	ogmrip
diff --git a/ocserv/DESCR b/ocserv/DESCR
new file mode 100644
index 0000000..68bdd3c
--- /dev/null
+++ b/ocserv/DESCR
@@ -0,0 +1,8 @@
+OpenConnect server (ocserv) is an SSL VPN server. Its purpose is
+to be a secure, small, fast and configurable VPN server. It implements
+the OpenConnect SSL VPN protocol, and has also (currently experimental)
+compatibility with clients using the AnyConnect SSL VPN protocol.
+The OpenConnect protocol provides a dual TCP/UDP VPN channel, and
+uses the standard IETF security protocols to secure it. The server
+is implemented primarily for the GNU/Linux platform but its code
+is designed to be portable to other UNIX variants as well.
diff --git a/ocserv/Makefile b/ocserv/Makefile
new file mode 100644
index 0000000..6993630
--- /dev/null
+++ b/ocserv/Makefile
@@ -0,0 +1,29 @@
+# $NetBSD$
+
+DISTNAME=	ocserv-0.11.2
+CATEGORIES=	security net
+MASTER_SITES=	ftp://ftp.infradead.org/pub/ocserv/
+EXTRACT_SUFX=	.tar.xz
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	ftp://ftp.infradead.org/pub/ocserv/
+COMMENT=	SSL VPN server
+LICENSE=	gnu-gpl-v2
+
+GNU_CONFIGURE=	yes
+USE_TOOLS+=	pkg-config gmake
+
+.include "../../archivers/lz4/buildlink3.mk"
+.include "../../devel/autogen/buildlink3.mk"
+.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../devel/libev/buildlink3.mk"
+.include "../../devel/protobuf-c/buildlink3.mk"
+# pkgsrc talloc pulls in python, use local copy
+#.include "../../devel/talloc/buildlink3.mk"
+# configure script fails to detect (Heimdal) GSSAPI
+#.include "../../mk/krb5.buildlink3.mk"
+# should support editline, but would need more patches
+#.include "../../mk/readline.buildlink3.mk"
+.include "../../devel/readline/buildlink3.mk"
+.include "../../security/gnutls/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/ocserv/PLIST b/ocserv/PLIST
new file mode 100644
index 0000000..6a70fed
--- /dev/null
+++ b/ocserv/PLIST
@@ -0,0 +1,8 @@
+@comment $NetBSD$
+bin/occtl
+bin/ocpasswd
+bin/ocserv-fw
+man/man8/occtl.8
+man/man8/ocpasswd.8
+man/man8/ocserv.8
+sbin/ocserv
diff --git a/ocserv/distinfo b/ocserv/distinfo
new file mode 100644
index 0000000..c4a9466
--- /dev/null
+++ b/ocserv/distinfo
@@ -0,0 +1,10 @@
+$NetBSD$
+
+SHA1 (ocserv-0.11.2.tar.xz) = 70083c7f8684a9ffb9300f38524dcbf874732965
+RMD160 (ocserv-0.11.2.tar.xz) = df8a97dd1bfa8596c3a6a3843c40bf2b170fa16f
+SHA512 (ocserv-0.11.2.tar.xz) = 029c5a3fe2fa278cd6b7ec3f7d22146a577bca85ea754cbad9c36a9d42b07ffdc37902794080bfa7e5b5b4242454134afbb216d29fae921380a894dcc21a0782
+Size (ocserv-0.11.2.tar.xz) = 747240 bytes
+SHA1 (patch-src_ccan_list_list.h) = 7daa342f9c14ce8ad7ae07295061b4fb9c2d2fb5
+SHA1 (patch-src_main.c) = 9bbc05fe72c73ce191f8fa57e779525930a2d400
+SHA1 (patch-src_tun.c) = 0381c8be926b70b7ae7ac77b5d089d0d70e40b30
+SHA1 (patch-src_worker-vpn.c) = 66f86330be15b8d1b92c0a7eee54e9784f6892c3
diff --git a/ocserv/patches/patch-src_ccan_list_list.h b/ocserv/patches/patch-src_ccan_list_list.h
new file mode 100644
index 0000000..108feec
--- /dev/null
+++ b/ocserv/patches/patch-src_ccan_list_list.h
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- src/ccan/list/list.h.orig	2015-09-19 09:37:05.000000000 +0000
++++ src/ccan/list/list.h
+@@ -6,8 +6,8 @@
+ #include <ccan/container_of/container_of.h>
+ #include <ccan/check_type/check_type.h>
+ 
+-#undef LIST_HEAD
+-#undef LIST_HEAD_INIT
++//#undef LIST_HEAD
++//#undef LIST_HEAD_INIT
+ 
+ /**
+  * struct list_node - an entry in a doubly-linked list
+@@ -99,6 +99,7 @@ struct list_node *list_check_node(const 
+ #define list_debug_node(n) (n)
+ #endif
+ 
++#if 0
+ /**
+  * LIST_HEAD_INIT - initializer for an empty list_head
+  * @name: the name of the list.
+@@ -128,6 +129,7 @@ struct list_node *list_check_node(const 
+  */
+ #define LIST_HEAD(name) \
+ 	struct list_head name = LIST_HEAD_INIT(name)
++#endif
+ 
+ /**
+  * list_head_init - initialize a list_head
diff --git a/ocserv/patches/patch-src_main.c b/ocserv/patches/patch-src_main.c
new file mode 100644
index 0000000..cbdfaec
--- /dev/null
+++ b/ocserv/patches/patch-src_main.c
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/main.c.orig	2016-04-25 20:55:23.000000000 +0000
++++ src/main.c
+@@ -139,7 +139,7 @@ int y;
+ #endif
+ 		}
+ 	}
+-#if defined(IP_PKTINFO)
++#if defined(IP_PKTINFO) && !defined(IP_RECVDSTADDR)
+ 	y = 1;
+ 	if (setsockopt(fd, SOL_IP, IP_PKTINFO,
+ 		       (const void *)&y, sizeof(y)) < 0)
diff --git a/ocserv/patches/patch-src_tun.c b/ocserv/patches/patch-src_tun.c
new file mode 100644
index 0000000..cdbfc04
--- /dev/null
+++ b/ocserv/patches/patch-src_tun.c
@@ -0,0 +1,30 @@
+$NetBSD$
+
+--- src/tun.c.orig	2016-04-07 21:29:50.000000000 +0000
++++ src/tun.c
+@@ -50,9 +50,11 @@
+ 
+ #if defined(__FreeBSD__) || defined(__OpenBSD__)
+ # include <net/if_var.h>
++#endif
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ # include <netinet/in_var.h>
+ #endif
+-#if defined(__OpenBSD__)
++#if defined(__NetBSD__) || defined(__OpenBSD__)
+ # include <netinet6/in6_var.h>
+ #endif
+ 
+@@ -242,7 +244,11 @@ int set_ipv6_addr(main_server_st * s, st
+ 	ifr6.ifra_dstaddr.sin6_family = AF_INET6;
+ 
+ 	ret = ipv6_prefix_to_mask(&ifr6.ifra_prefixmask.sin6_addr, proc->config->ipv6_prefix);
+-	if (ret == 0) {
++#if defined(__NetBSD__)
++#else
++	if (ret == 0)
++#endif
++	{
+ 		memset(&ifr6.ifra_prefixmask.sin6_addr, 0xff, sizeof(struct in6_addr));
+ 	}
+ 	ifr6.ifra_prefixmask.sin6_len = sizeof(struct sockaddr_in6);
diff --git a/ocserv/patches/patch-src_worker-vpn.c b/ocserv/patches/patch-src_worker-vpn.c
new file mode 100644
index 0000000..e055e80
--- /dev/null
+++ b/ocserv/patches/patch-src_worker-vpn.c
@@ -0,0 +1,36 @@
+$NetBSD$
+
+--- src/worker-vpn.c.orig	2016-04-25 20:55:23.000000000 +0000
++++ src/worker-vpn.c
+@@ -865,6 +865,7 @@ int periodic_check(worker_st * ws, unsig
+ 		}
+ 	}
+ 
++#if 0
+ 	if (ws->conn_type != SOCK_TYPE_UNIX) {
+ 		sl = sizeof(max);
+ 		ret = getsockopt(ws->conn_fd, IPPROTO_TCP, TCP_MAXSEG, &max, &sl);
+@@ -882,6 +883,7 @@ int periodic_check(worker_st * ws, unsig
+ 			}
+ 		}
+ 	}
++#endif
+ 
+  cleanup:
+ 	ws->last_periodic_check = now;
+@@ -1443,6 +1445,7 @@ static int connect_handler(worker_st * w
+ 		ws->vinfo.mtu = MIN(ws->vinfo.mtu, req->base_mtu);
+ 	}
+ 
++#if 0
+ 	if (ws->conn_type != SOCK_TYPE_UNIX) {
+ 		sl = sizeof(max);
+ 		ret = getsockopt(ws->conn_fd, IPPROTO_TCP, TCP_MAXSEG, &max, &sl);
+@@ -1459,6 +1462,7 @@ static int connect_handler(worker_st * w
+ 			}
+ 		}
+ 	}
++#endif
+ 
+ 	ret = cstp_printf(ws, "X-CSTP-Base-MTU: %u\r\n", ws->vinfo.mtu);
+ 	SEND_ERR(ret);


Home | Main Index | Thread Index | Old Index