summaryrefslogtreecommitdiff
path: root/net/sslh
diff options
context:
space:
mode:
authorrhialto <rhialto@pkgsrc.org>2022-01-01 16:47:20 +0000
committerrhialto <rhialto@pkgsrc.org>2022-01-01 16:47:20 +0000
commitf1e748e8f0918ebf3108edc95a246fa1fa5a718d (patch)
tree25803883b6cc0fd261bbbee069d7ff7934a8cdf0 /net/sslh
parentdf4b2eedd53926023a6ad3379c8160d2d9c68feb (diff)
downloadpkgsrc-f1e748e8f0918ebf3108edc95a246fa1fa5a718d.tar.gz
net/sslh: update to 1.22c
- sslh-select now supports UDP protocols. Probes specified in the protocols configuration entry are tried on incoming packets, TCP or UDP, and forwarded based on the input protocol (an incoming TCP connection will be forwarded as TCP, and same with UDP). This has been tested with DNS as shown in udp.cfg: incoming packets that contain my domain name are assumed to be a DNS request and forwarded accordingly. Note this could cause problems if combined with incoming TLS with SNI. UDP clients and servers need to agree on the IPv4/IPv6 they use: use the same protocol on all sides! Often, this means explicitely using `ip4-localhost'. UDP sender-receiver pairs (connections, so to speak) are kept for 60s, which can be changed with udp_timeout in the configuration. - Added probes for UDP protocols QUICK and Teamspeak. - Added probes for syslog protocol. - sslh-select refactored to change linear searches through connections to linear searches through fd_set. - Fixed a libconfig call to support libconfig 1.7.3. - Added symbol to support libconfig 1.4.9, still in use in CentOS7. - Warn about unknown settings in the configuration file. - Added per-protocol transparent option. sslh-fork drops the capability after creating the server-side transparent socket. Transparent now uses CAP_NET_RAW instead of CAP_NET_ADMIN. - Removed compile-time option to use POSIX regex. Now regex must be PCRE2 (Perl-Compatible). This was in fact the case since v1.21, as PCRE are used to parse the config file.
Diffstat (limited to 'net/sslh')
-rw-r--r--net/sslh/Makefile6
-rw-r--r--net/sslh/distinfo17
-rw-r--r--net/sslh/patches/patch-common.h22
-rw-r--r--net/sslh/patches/patch-echosrv.c22
-rw-r--r--net/sslh/patches/patch-sslh-select.c19
5 files changed, 42 insertions, 44 deletions
diff --git a/net/sslh/Makefile b/net/sslh/Makefile
index cbfd2b7fed2..701d027dc5f 100644
--- a/net/sslh/Makefile
+++ b/net/sslh/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.15 2021/06/13 12:04:21 rhialto Exp $
+# $NetBSD: Makefile,v 1.16 2022/01/01 16:47:20 rhialto Exp $
-DISTNAME= sslh-1.21c
+DISTNAME= sslh-1.22c
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_GITHUB:=yrutschle/}
GITHUB_TAG= v${PKGVERSION_NOREV}
@@ -40,6 +40,6 @@ do-install:
.include "../../devel/libconfig/buildlink3.mk"
.include "../../devel/libgetopt/buildlink3.mk"
-.include "../../devel/pcre/buildlink3.mk"
+.include "../../devel/pcre2/buildlink3.mk"
.include "../../security/tcp_wrappers/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/net/sslh/distinfo b/net/sslh/distinfo
index 8989ab8b31c..0f32c291893 100644
--- a/net/sslh/distinfo
+++ b/net/sslh/distinfo
@@ -1,12 +1,9 @@
-$NetBSD: distinfo,v 1.13 2021/10/26 11:06:58 nia Exp $
+$NetBSD: distinfo,v 1.14 2022/01/01 16:47:20 rhialto Exp $
-BLAKE2s (sslh-1.21c.tar.gz) = f8a6a048eaf9fa88d79a39237bc6aaed761740c93fe03b935586389eee81d3e8
-SHA512 (sslh-1.21c.tar.gz) = 9446c6afe965684c5d6406ac8917338f57d95f8fbfacd7a51193dd5dbac77e1ed5e39eb8e2575e7025a8612b25e9fba7e64832a48c999f366875217b9328da22
-Size (sslh-1.21c.tar.gz) = 111895 bytes
-SHA1 (patch-argtable3.c) = da39a3ee5e6b4b0d3255bfef95601890afd80709
+BLAKE2s (sslh-1.22c.tar.gz) = 81e3a9d77b7c0030e4cf8edf3344f3e4fd06736952939aa66c55b0d6aa0176e2
+SHA512 (sslh-1.22c.tar.gz) = f13560fbe74b5b08e9b360985d6afd27f2c7e157d220919162e354f3711b90f43bb81f9bda341fb21fef2651acd488f52e9a04dc2da28861540f579e7ca798c4
+Size (sslh-1.22c.tar.gz) = 146954 bytes
SHA1 (patch-common.c) = e5aa0cc38e9c62a765400b08ed700e9d2f08f2db
-SHA1 (patch-common.h) = 3e4cc77aeedf9fa4e94329dcf1c1c65099d3ae68
-SHA1 (patch-echosrv.c) = 611044fd7ed1fd52c44e2d8ff393091c35478e17
-SHA1 (patch-sslh-conf.c) = da39a3ee5e6b4b0d3255bfef95601890afd80709
-SHA1 (patch-sslh-main.c) = 059fd93a7412fc2ca38b29ae0c65783f4213e77c
-SHA1 (patch-sslh-select.c) = d470e6dc803164fbdfa77ddc189cdb4dd7672bd4
+SHA1 (patch-common.h) = d89c6ce3f9a4f2b4b4c734adcafd0eed6abca84e
+SHA1 (patch-echosrv.c) = 96832c2391ff63cd96efa8e65270be6845f4a306
+SHA1 (patch-sslh-select.c) = ea07bf85d6ccdcd3815d49bb0131439573152502
diff --git a/net/sslh/patches/patch-common.h b/net/sslh/patches/patch-common.h
index ac886c0737c..659687e0c1b 100644
--- a/net/sslh/patches/patch-common.h
+++ b/net/sslh/patches/patch-common.h
@@ -1,10 +1,10 @@
-$NetBSD: patch-common.h,v 1.2 2021/06/13 12:04:21 rhialto Exp $
+$NetBSD: patch-common.h,v 1.3 2022/01/01 16:47:21 rhialto Exp $
Avoid queue variable conflict.
---- common.h.orig 2020-07-30 07:45:50.000000000 +0000
+--- common.h.orig 2021-08-28 14:33:20.000000000 +0000
+++ common.h
-@@ -85,7 +85,7 @@ enum connection_state {
+@@ -88,7 +88,7 @@ enum connection_state {
/* A 'queue' is composed of a file descriptor (which can be read from or
* written to), and a queue for deferred write data */
@@ -13,27 +13,27 @@ Avoid queue variable conflict.
int fd;
void *begin_deferred_data;
void *deferred_data;
-@@ -100,7 +100,7 @@ struct connection {
+@@ -106,7 +106,7 @@ struct connection {
/* q[0]: queue for external connection (client);
* q[1]: queue for internal connection (httpd or sshd);
* */
- struct queue q[2];
+ struct sslhqueue q[2];
- };
- #define FD_CNXCLOSED 0
-@@ -118,7 +118,7 @@ struct connection_desc {
- /* common.c */
+ /* SOCK_DGRAM */
+ struct sockaddr client_addr; /* Contains the remote client address */
+@@ -148,7 +148,7 @@ typedef enum {
void init_cnx(struct connection *cnx);
- int connect_addr(struct connection *cnx, int fd_from);
+ int set_nonblock(int fd);
+ int connect_addr(struct connection *cnx, int fd_from, connect_blocking blocking);
-int fd2fd(struct queue *target, struct queue *from);
+int fd2fd(struct sslhqueue *target, struct sslhqueue *from);
char* sprintaddr(char* buf, size_t size, struct addrinfo *a);
void resolve_name(struct addrinfo **out, char* fullname);
int get_connection_desc(struct connection_desc* desc, const struct connection *cnx);
-@@ -135,8 +135,8 @@ int resolve_split_name(struct addrinfo *
+@@ -166,8 +166,8 @@ int resolve_split_name(struct addrinfo *
- int start_listen_sockets(int *sockfd[], struct addrinfo *addr_list);
+ int start_listen_sockets(struct listen_endpoint *sockfd[]);
-int defer_write(struct queue *q, void* data, int data_size);
-int flush_deferred(struct queue *q);
diff --git a/net/sslh/patches/patch-echosrv.c b/net/sslh/patches/patch-echosrv.c
index 92083153226..1c2a1676d94 100644
--- a/net/sslh/patches/patch-echosrv.c
+++ b/net/sslh/patches/patch-echosrv.c
@@ -1,15 +1,17 @@
-$NetBSD: patch-echosrv.c,v 1.2 2014/11/28 10:45:28 bsiegert Exp $
+$NetBSD: patch-echosrv.c,v 1.2 2014/11/28 10:45:28 bsiegert Exp
-* getopt_long_only does not exist on NetBSD getopt.
+Provide allow_severity and deny_severity for libwrap.
---- echosrv.c.orig 2014-02-11 21:06:01.000000000 +0000
+--- echosrv.c.orig 2022-01-01 16:38:28.450058726 +0000
+++ echosrv.c
-@@ -64,7 +64,7 @@ void parse_cmdline(int argc, char* argv[
- };
- struct addrinfo **a;
+@@ -41,6 +41,10 @@
+ #define SA_NOCLDWAIT 0
+ #endif
-- while ((c = getopt_long_only(argc, argv, "l:p:", options, NULL)) != -1) {
-+ while ((c = getopt_long(argc, argv, "l:p:", options, NULL)) != -1) {
- if (c == 0) continue;
++#ifdef LIBWRAP
++int allow_severity =0, deny_severity = 0;
++#endif
++
+ struct echocfg_item cfg;
- switch (c) {
+ void check_res_dump(int res, struct addrinfo *addr, char* syscall)
diff --git a/net/sslh/patches/patch-sslh-select.c b/net/sslh/patches/patch-sslh-select.c
index e30cb96de58..cfd003a6522 100644
--- a/net/sslh/patches/patch-sslh-select.c
+++ b/net/sslh/patches/patch-sslh-select.c
@@ -1,25 +1,24 @@
-$NetBSD: patch-sslh-select.c,v 1.1 2017/08/15 13:13:36 jperkin Exp $
+$NetBSD: patch-sslh-select.c,v 1.2 2022/01/01 16:47:21 rhialto Exp $
Avoid queue variable conflict.
---- sslh-select.c.orig 2016-03-29 19:19:05.000000000 +0000
+--- sslh-select.c.orig 2021-08-28 14:33:20.000000000 +0000
+++ sslh-select.c
-@@ -131,7 +131,7 @@ int accept_new_connection(int listen_soc
- /* Connect queue 1 of connection to SSL; returns new file descriptor */
- int connect_queue(struct connection *cnx, fd_set *fds_r, fd_set *fds_w)
+@@ -129,7 +129,7 @@ static struct connection* accept_new_con
+ static int connect_queue(struct connection* cnx,
+ struct select_info* fd_info)
{
- struct queue *q = &cnx->q[1];
+ struct sslhqueue *q = &cnx->q[1];
- q->fd = connect_addr(cnx, cnx->q[0].fd);
+ q->fd = connect_addr(cnx, cnx->q[0].fd, NON_BLOCKING);
if ((q->fd != -1) && fd_is_in_range(q->fd)) {
-@@ -156,7 +156,8 @@ int connect_queue(struct connection *cnx
- void shovel(struct connection *cnx, int active_fd,
- fd_set *fds_r, fd_set *fds_w)
+@@ -153,7 +153,7 @@ static int connect_queue(struct connecti
+ */
+ static void shovel(struct connection *cnx, int active_fd, struct select_info* fd_info)
{
- struct queue *read_q, *write_q;
+ struct sslhqueue *read_q, *write_q;
-+
read_q = &cnx->q[active_fd];
write_q = &cnx->q[1-active_fd];