pkgsrc-Changes-HG archive

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

[.joined/pkgsrc/trunk]: .joined/pkgsrc/net/sslh net/sslh: update to 1.22c



details:   https://anonhg.NetBSD.org/.joined/pkgsrc/rev/400932a6ef17
branches:  trunk
changeset: 370909:400932a6ef17
user:      rhialto <rhialto%pkgsrc.org@localhost>
date:      Sat Jan 01 16:47:20 2022 +0000

description:
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:

 net/sslh/Makefile                    |   6 +++---
 net/sslh/distinfo                    |  17 +++++++----------
 net/sslh/patches/patch-common.h      |  22 +++++++++++-----------
 net/sslh/patches/patch-echosrv.c     |  22 ++++++++++++----------
 net/sslh/patches/patch-sslh-select.c |  19 +++++++++----------
 5 files changed, 42 insertions(+), 44 deletions(-)

diffs (165 lines):

diff -r 39a10d195a98 -r 400932a6ef17 net/sslh/Makefile
--- a/net/sslh/Makefile Sat Jan 01 16:31:30 2022 +0000
+++ b/net/sslh/Makefile Sat Jan 01 16:47:20 2022 +0000
@@ -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 @@
 
 .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 -r 39a10d195a98 -r 400932a6ef17 net/sslh/distinfo
--- a/net/sslh/distinfo Sat Jan 01 16:31:30 2022 +0000
+++ b/net/sslh/distinfo Sat Jan 01 16:47:20 2022 +0000
@@ -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 -r 39a10d195a98 -r 400932a6ef17 net/sslh/patches/patch-common.h
--- a/net/sslh/patches/patch-common.h   Sat Jan 01 16:31:30 2022 +0000
+++ b/net/sslh/patches/patch-common.h   Sat Jan 01 16:47:20 2022 +0000
@@ -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 @@
      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 -r 39a10d195a98 -r 400932a6ef17 net/sslh/patches/patch-echosrv.c
--- a/net/sslh/patches/patch-echosrv.c  Sat Jan 01 16:31:30 2022 +0000
+++ b/net/sslh/patches/patch-echosrv.c  Sat Jan 01 16:47:20 2022 +0000
@@ -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 -r 39a10d195a98 -r 400932a6ef17 net/sslh/patches/patch-sslh-select.c
--- a/net/sslh/patches/patch-sslh-select.c      Sat Jan 01 16:31:30 2022 +0000
+++ b/net/sslh/patches/patch-sslh-select.c      Sat Jan 01 16:47:20 2022 +0000
@@ -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];



Home | Main Index | Thread Index | Old Index