From owner-dev-commits-ports-main@freebsd.org Thu Jul 1 10:13:41 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9EFA6661337; Thu, 1 Jul 2021 10:13:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFvF13qtSz3Jbn; Thu, 1 Jul 2021 10:13:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6BB1C1E9CB; Thu, 1 Jul 2021 10:13:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161ADfa9041118; Thu, 1 Jul 2021 10:13:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161ADfIi041117; Thu, 1 Jul 2021 10:13:41 GMT (envelope-from git) Date: Thu, 1 Jul 2021 10:13:41 GMT Message-Id: <202107011013.161ADfIi041117@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: 6952f08efc14 - main - devel/libpdel: update to version 0.6.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6952f08efc1473184564e5054762df88ac15acaf Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 10:13:41 -0000 The branch main has been updated by se: URL: https://cgit.FreeBSD.org/ports/commit/?id=6952f08efc1473184564e5054762df88ac15acaf commit 6952f08efc1473184564e5054762df88ac15acaf Author: Stefan Eßer AuthorDate: 2021-07-01 09:38:32 +0000 Commit: Stefan Eßer CommitDate: 2021-07-01 10:13:25 +0000 devel/libpdel: update to version 0.6.1 Set MASTER_SITE to SourceForge. Fix build on FreeBSD-14 and remove DEPRECATED status from Makefile. --- devel/libpdel/Makefile | 17 ++-- devel/libpdel/distinfo | 5 +- devel/libpdel/files/patch-Makefile | 15 ++- ...ttp_http_server.c => patch-http_http__server.c} | 6 +- .../libpdel/files/patch-http_servlet_cookieauth.c | 10 -- devel/libpdel/files/patch-len | 80 --------------- .../files/{patch-arp => patch-net_if__arp.c} | 111 ++++++--------------- ...tch-net__route_msg.c => patch-net_route__msg.c} | 6 +- devel/libpdel/files/patch-net_uroute.c | 42 ++++++++ devel/libpdel/files/patch-ppp_auth_radius.c | 22 ---- devel/libpdel/files/patch-ppp_ppp__l2tp__ctrl.c | 29 ++++++ devel/libpdel/files/patch-ppp_ppp__l2tp__ctrl.h | 11 ++ devel/libpdel/files/patch-ppp_ppp__l2tp__server.c | 20 ++++ devel/libpdel/files/patch-ppp_ppp__msoft.c | 8 +- devel/libpdel/files/patch-ppp_ppp__node.c | 20 ++++ devel/libpdel/files/patch-rsa_util.c | 10 -- devel/libpdel/files/patch-sys_fs__mount.c | 11 ++ devel/libpdel/files/patch-util_paction.c | 54 ---------- devel/libpdel/files/patch-util_pevent.c | 105 +++---------------- devel/libpdel/pkg-plist | 25 ++++- 20 files changed, 240 insertions(+), 367 deletions(-) diff --git a/devel/libpdel/Makefile b/devel/libpdel/Makefile index d013efd6bd1e..50acd97fb5ee 100644 --- a/devel/libpdel/Makefile +++ b/devel/libpdel/Makefile @@ -1,22 +1,25 @@ # Created by: Archie Cobbs PORTNAME= libpdel -PORTVERSION= 0.5.3 -PORTREVISION= 6 +PORTVERSION= 0.6.1 CATEGORIES= devel net www -MASTER_SITES= LOCAL/archie +MASTER_SITES= SF/libpdel/libpdel-combined/${PORTVERSION}/ MAINTAINER= ports@FreeBSD.org COMMENT= Packet Design multi-purpose C library for embedded applications -DEPRECATED= mastersite disappeared as of 20210515 -EXPIRATION_DATE= 2021-08-15 -BROKEN_FreeBSD_14= fails to compile: /usr/include/ufs/ufs/ufsmount.h:99:31: error: field has incomplete type 'struct ufs_extattr_per_mount' +LICENSE= PACKETDESIGN +LICENSE_NAME= Packet Design +LICENSE_FILE= ${WRKSRC}/COPYRIGHT +LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept LIB_DEPENDS= libexpat.so:textproc/expat2 +USES= tar:bz2 +USE_LDCONFIG= yes + MAKE_ENV= WITHOUT_PROFILE=yes __MAKE_CONF=/dev/null SRCCONF=/dev/null -USE_LDCONFIG= yes +WRKSRC_SUBDIR= pdel .include diff --git a/devel/libpdel/distinfo b/devel/libpdel/distinfo index 9bc1b4d6d40c..6765b63a6196 100644 --- a/devel/libpdel/distinfo +++ b/devel/libpdel/distinfo @@ -1,2 +1,3 @@ -SHA256 (libpdel-0.5.3.tar.gz) = 05295e9005bc019209d54f69f8470373ecfaba615163b5e1c2499a1cafe6c8ae -SIZE (libpdel-0.5.3.tar.gz) = 479857 +TIMESTAMP = 1625128805 +SHA256 (libpdel-0.6.1.tar.bz2) = b0bccc74a51a936177ba6e9274c623631974986f9ccd3d7cf9461927920b5eab +SIZE (libpdel-0.6.1.tar.bz2) = 528773 diff --git a/devel/libpdel/files/patch-Makefile b/devel/libpdel/files/patch-Makefile index f19f5ad80c3d..0a3080bcca86 100644 --- a/devel/libpdel/files/patch-Makefile +++ b/devel/libpdel/files/patch-Makefile @@ -1,5 +1,5 @@ ---- Makefile.orig 2014-04-26 19:31:00.000000000 -0300 -+++ Makefile 2014-04-26 19:31:40.000000000 -0300 +--- Makefile.orig 2009-05-13 21:36:05 UTC ++++ Makefile @@ -2,6 +2,11 @@ LIB= pdel @@ -9,6 +9,15 @@ +SHAREOWN= ${BINOWN} +SHAREGRP= ${BINGRP} + - SUBDIRS= config http io net ppp structs sys tmpl util + SUBDIRS= config http io misc net pdel ppp regex structs sys thread tmpl util VERSION!= grep -w PDEL_VERSION_STRING ${.CURDIR}/version.h \ +@@ -32,7 +37,7 @@ OBJDIR= ${PDELTOP}/obj/${OS}.${ARCH} + SHLIB_MAJOR= ${VERSION_MAJOR} + SHLIB_MAJOR= ${VERSION_MINOR} + MAN= libpdel.3 +-NO_PROFILE= ++MK_PROFILE= no + INCHDRS= version.h + BASEINCHDRS= + diff --git a/devel/libpdel/files/patch-http_http_server.c b/devel/libpdel/files/patch-http_http__server.c similarity index 64% rename from devel/libpdel/files/patch-http_http_server.c rename to devel/libpdel/files/patch-http_http__server.c index 2b90f2ed9e38..dc24623e924a 100644 --- a/devel/libpdel/files/patch-http_http_server.c +++ b/devel/libpdel/files/patch-http_http__server.c @@ -1,6 +1,6 @@ ---- http/http_server.c.orig 2005-01-21 16:01:58.000000000 -0500 -+++ http/http_server.c 2015-03-23 19:34:45.664653000 -0400 -@@ -197,7 +197,7 @@ +--- http/http_server.c.orig 2009-05-13 21:36:02 UTC ++++ http/http_server.c +@@ -171,7 +171,7 @@ http_server_start(struct pevent_ctx *ctx, struct in_ad _http_ssl_init(); /* Initialize SSL context for this server */ diff --git a/devel/libpdel/files/patch-http_servlet_cookieauth.c b/devel/libpdel/files/patch-http_servlet_cookieauth.c deleted file mode 100644 index 4a4bb3cc66b5..000000000000 --- a/devel/libpdel/files/patch-http_servlet_cookieauth.c +++ /dev/null @@ -1,10 +0,0 @@ ---- http/servlet/http_servlet_cookieauth.c.orig Sat Jan 22 06:01:58 2005 -+++ http/servlet/http_servlet_cookieauth.c Sun Sep 17 19:53:55 2006 -@@ -54,6 +54,7 @@ - #include - - #include -+#include - - #include "structs/structs.h" - #include "structs/type/array.h" diff --git a/devel/libpdel/files/patch-len b/devel/libpdel/files/patch-len deleted file mode 100644 index 03cbd4fa29f6..000000000000 --- a/devel/libpdel/files/patch-len +++ /dev/null @@ -1,80 +0,0 @@ ---- ppp/ppp_l2tp_ctrl.c 2005-01-21 23:02:07.000000000 +0200 -+++ ppp/ppp_l2tp_ctrl.c 2009-06-23 15:45:43.000000000 +0300 -@@ -200,7 +200,7 @@ struct ppp_l2tp_sess { - u_int16_t peer_id; /* peer session id */ - struct ppp_log *log; /* log */ - ng_ID_t node_id; /* tee node id */ -- char hook[NG_HOOKLEN + 1]; /* session hook name */ -+ char hook[NG_HOOKSIZ]; /* session hook name */ - void *link_cookie; /* opaque link cookie */ - u_int16_t result; /* close result code */ - u_int16_t error; /* close error code */ -@@ -608,7 +608,7 @@ ppp_l2tp_ctrl_create(struct pevent_ctx * - - /* Done */ - *nodep = ctrl->node_id; -- strlcpy(hook, NG_L2TP_HOOK_LOWER, NG_HOOKLEN + 1); -+ strlcpy(hook, NG_L2TP_HOOK_LOWER, NG_HOOKSIZ); - return (ctrl); - - fail: -@@ -1860,7 +1860,7 @@ ppp_l2tp_ctrl_event(void *arg) - struct ng_mesg msg; - } buf; - struct ng_mesg *const msg = &buf.msg; -- char raddr[NG_PATHLEN + 1]; -+ char raddr[NG_PATHSIZ]; - int len; - - /* Read netgraph control message */ ---- ppp/ppp_l2tp_ctrl.h 2005-01-21 23:02:07.000000000 +0200 -+++ ppp/ppp_l2tp_ctrl.h 2009-06-23 15:45:22.000000000 +0300 -@@ -201,7 +201,7 @@ __BEGIN_DECLS - * peer_id Unique identifier for peer (used for tie-breakers) - * initiate Whether to send a SCCRQ or just wait for one - * nodep Pointer to netgraph node ID variable -- * hook Buffer for hook on L2TP netgraph node (size >= NG_HOOKLEN + 1) -+ * hook Buffer for hook on L2TP netgraph node (size >= NG_HOOKSIZ) - * avps List of AVP's to include in the associated - * Start-Control-Connection-Request or - * Start-Control-Connection-Reply control message. ---- ppp/ppp_l2tp_server.c 2005-01-21 23:02:07.000000000 +0200 -+++ ppp/ppp_l2tp_server.c 2009-06-23 15:45:33.000000000 +0300 -@@ -103,7 +103,7 @@ struct ppp_l2tp_peer { - struct ppp_channel *chan; /* pointer to channel */ - struct ppp_auth_config auth; /* auth config */ - char node[32]; /* node path */ -- char hook[NG_HOOKLEN + 1]; /* node hook */ -+ char hook[NG_HOOKSIZ]; /* node hook */ - char logname[32]; /* peer logname */ - struct in_addr ip; /* peer ip address */ - u_int16_t port; /* peer port */ -@@ -536,7 +536,7 @@ ppp_l2tp_server_sock_event(void *arg) - struct sockaddr_in sin; - const size_t bufsize = 8192; - u_int16_t *buf = NULL; -- char hook[NG_HOOKLEN + 1]; -+ char hook[NG_HOOKSIZ]; - socklen_t sin_len; - char namebuf[64]; - ng_ID_t node_id; ---- ppp/ppp_node.c 2005-01-21 23:02:08.000000000 +0200 -+++ ppp/ppp_node.c 2009-06-23 15:45:52.000000000 +0300 -@@ -431,7 +431,7 @@ int - ppp_node_send_msg(struct ppp_node *node, const char *relpath, - u_int32_t cookie, u_int32_t cmd, const void *payload, size_t plen) - { -- char path[NG_PATHLEN + 1]; -+ char path[NG_PATHSIZ]; - - if (relpath == NULL) - strlcpy(path, NODE_HOOK, sizeof(path)); -@@ -494,7 +494,7 @@ ppp_node_read_message(void *arg) - { - struct ppp_node *const node = arg; - const size_t max_msglen = 4096; -- char raddr[NG_PATHLEN + 1]; -+ char raddr[NG_PATHSIZ]; - struct ppp_node_recvmsg *rm; - struct ng_mesg *msg; - int found = 0; diff --git a/devel/libpdel/files/patch-arp b/devel/libpdel/files/patch-net_if__arp.c similarity index 71% rename from devel/libpdel/files/patch-arp rename to devel/libpdel/files/patch-net_if__arp.c index 01a5748991e7..cfa542a7780b 100644 --- a/devel/libpdel/files/patch-arp +++ b/devel/libpdel/files/patch-net_if__arp.c @@ -1,48 +1,6 @@ ---- net/uroute.c.prev 2005-01-21 23:02:03.000000000 +0200 -+++ net/uroute.c 2008-12-24 21:34:43.000000000 +0200 -@@ -74,9 +74,15 @@ - ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long)) - #define ADVANCE(x, n) ((x) += ROUNDUP((n)->sa_len)) - -+#ifdef RTF_CLONING - #define WRITABLE_FLAGS (RTF_STATIC | RTF_LLINFO | RTF_REJECT | RTF_BLACKHOLE \ - | RTF_PROTO1 | RTF_PROTO2 | RTF_CLONING \ - | RTF_XRESOLVE | RTF_UP | RTF_GATEWAY) -+#else -+#define WRITABLE_FLAGS (RTF_STATIC | RTF_REJECT | RTF_BLACKHOLE \ -+ | RTF_PROTO1 | RTF_PROTO2 \ -+ | RTF_XRESOLVE | RTF_UP | RTF_GATEWAY) -+#endif - - struct route_flag { - const char *name; -@@ -92,15 +98,23 @@ static const struct route_flag route_fla - FLAG(DYNAMIC), - FLAG(MODIFIED), - FLAG(DONE), -+#ifdef RTF_CLONING - FLAG(CLONING), -+#endif - FLAG(XRESOLVE), -+#ifdef RTF_LLINFO - FLAG(LLINFO), -+#endif - FLAG(STATIC), - FLAG(BLACKHOLE), - FLAG(PROTO2), - FLAG(PROTO1), -+#ifdef RTF_PRCLONING - FLAG(PRCLONING), -+#endif -+#ifdef RTF_WASCLONED - FLAG(WASCLONED), -+#endif - FLAG(PROTO3), - FLAG(PINNED), - FLAG(LOCAL), ---- net/if_arp.c.prev 2005-01-21 23:02:02.000000000 +0200 -+++ net/if_arp.c 2008-12-24 23:01:46.000000000 +0200 -@@ -68,7 +68,6 @@ +--- net/if_arp.c.orig 2009-05-13 21:36:04 UTC ++++ net/if_arp.c +@@ -35,7 +35,6 @@ #include "structs/type/array.h" #include "net/if_util.h" @@ -50,7 +8,7 @@ #include "util/typed_mem.h" #define ROUNDUP(a) \ -@@ -124,7 +123,11 @@ if_get_arp(struct in_addr ip, u_char *et +@@ -91,7 +90,11 @@ if_get_arp(struct in_addr ip, u_char *ether) mib[2] = 0; mib[3] = AF_INET; mib[4] = NET_RT_FLAGS; @@ -62,7 +20,7 @@ if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) return (-1); needed += 128; -@@ -227,9 +230,11 @@ tryagain: +@@ -194,9 +197,11 @@ tryagain: sdl = (struct sockaddr_dl *)(void *) (ROUNDUP(sin->sin_len) + (char *)sin); if (sin->sin_addr.s_addr == sin_m.sin_addr.s_addr) { @@ -77,7 +35,7 @@ switch (sdl->sdl_type) { case IFT_ETHER: case IFT_FDDI: -@@ -278,6 +283,7 @@ arp_delete(int sock, struct in_addr ip) +@@ -245,6 +250,7 @@ arp_delete(int sock, struct in_addr ip) struct rt_msghdr *const rtm = &m_rtmsg.m_rtm; struct sockaddr_dl *sdl; @@ -85,7 +43,7 @@ sin_m = zero_sin; sin->sin_addr = ip; tryagain: -@@ -286,14 +292,15 @@ tryagain: +@@ -253,14 +259,15 @@ tryagain: sin = (struct sockaddr_inarp *)(rtm + 1); sdl = (struct sockaddr_dl *)(void *) (ROUNDUP(sin->sin_len) + (char *)sin); @@ -106,7 +64,7 @@ } if (sin_m.sin_other & SIN_PROXY) { errno = ENOENT; -@@ -384,42 +391,55 @@ int +@@ -351,42 +358,55 @@ int if_flush_arp(void) { int errno_save = errno; @@ -114,26 +72,6 @@ - int rtn = 0; - int num; - int i; -- -- /* Get list of routes */ -- if ((num = uroute_get_all(&list, TYPED_MEM_TEMP)) == -1) -- return (-1); -- -- /* Delete ARP routes */ -- for (i = 0; i < num; i++) { -- struct uroute *const route = list[i]; -- const struct sockaddr *dest; -- const struct sockaddr *gw; -- -- /* Is this an ARP entry? */ -- dest = uroute_get_dest(route); -- gw = uroute_get_gateway(route); -- if ((uroute_get_flags(route) -- & (RTF_HOST|RTF_LLINFO|RTF_WASCLONED)) -- != (RTF_HOST|RTF_LLINFO|RTF_WASCLONED) -- || dest->sa_family != AF_INET -- || gw->sa_family != AF_LINK) -- continue; + int mib[6]; + size_t needed; + char *lim, *buf, *next; @@ -142,15 +80,17 @@ + struct sockaddr_dl *sdl; + int sock, rtn = -1; -- /* Delete it */ -- if (uroute_delete(route) == -1) { -- errno_save = errno; -- rtn = -1; -- } +- /* Get list of routes */ +- if ((num = uroute_get_all(&list, TYPED_MEM_TEMP)) == -1) + /* Get socket */ + if ((sock = socket(PF_ROUTE, SOCK_RAW, 0)) == -1) -+ return (-1); -+ + return (-1); + +- /* Delete ARP routes */ +- for (i = 0; i < num; i++) { +- struct uroute *const route = list[i]; +- const struct sockaddr *dest; +- const struct sockaddr *gw; + /* Get ARP table */ + mib[0] = CTL_NET; + mib[1] = PF_ROUTE; @@ -170,7 +110,22 @@ + if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) { + goto done2; + } -+ + +- /* Is this an ARP entry? */ +- dest = uroute_get_dest(route); +- gw = uroute_get_gateway(route); +- if ((uroute_get_flags(route) +- & (RTF_HOST|RTF_LLINFO|RTF_WASCLONED)) +- != (RTF_HOST|RTF_LLINFO|RTF_WASCLONED) +- || dest->sa_family != AF_INET +- || gw->sa_family != AF_LINK) +- continue; +- +- /* Delete it */ +- if (uroute_delete(route) == -1) { +- errno_save = errno; +- rtn = -1; +- } + /* Find desired entry */ + lim = buf + needed; + for (next = buf; next < lim; next += rtm->rtm_msglen) { diff --git a/devel/libpdel/files/patch-net__route_msg.c b/devel/libpdel/files/patch-net_route__msg.c similarity index 75% rename from devel/libpdel/files/patch-net__route_msg.c rename to devel/libpdel/files/patch-net_route__msg.c index 43acfed2c5d0..06f435d09aaa 100644 --- a/devel/libpdel/files/patch-net__route_msg.c +++ b/devel/libpdel/files/patch-net_route__msg.c @@ -1,6 +1,6 @@ ---- net/route_msg.c.orig 2014-04-26 19:28:21.000000000 -0300 -+++ net/route_msg.c 2014-04-26 19:28:57.000000000 -0300 -@@ -608,8 +608,12 @@ +--- net/route_msg.c.orig 2009-05-13 21:36:04 UTC ++++ net/route_msg.c +@@ -575,8 +575,12 @@ route_msg_print(struct route_msg *msg, FILE *fp) case RTM_REDIRECT: typestr = "REDIRECT"; break; case RTM_MISS: typestr = "MISS"; break; case RTM_LOCK: typestr = "LOCK"; break; diff --git a/devel/libpdel/files/patch-net_uroute.c b/devel/libpdel/files/patch-net_uroute.c new file mode 100644 index 000000000000..b700f511fd2e --- /dev/null +++ b/devel/libpdel/files/patch-net_uroute.c @@ -0,0 +1,42 @@ +--- net/uroute.c.orig 2009-05-13 21:36:04 UTC ++++ net/uroute.c +@@ -41,9 +41,15 @@ + ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long)) + #define ADVANCE(x, n) ((x) += ROUNDUP((n)->sa_len)) + ++#ifdef RTF_CLONING + #define WRITABLE_FLAGS (RTF_STATIC | RTF_LLINFO | RTF_REJECT | RTF_BLACKHOLE \ + | RTF_PROTO1 | RTF_PROTO2 | RTF_CLONING \ + | RTF_XRESOLVE | RTF_UP | RTF_GATEWAY) ++#else ++#define WRITABLE_FLAGS (RTF_STATIC | RTF_REJECT | RTF_BLACKHOLE \ ++ | RTF_PROTO1 | RTF_PROTO2 \ ++ | RTF_XRESOLVE | RTF_UP | RTF_GATEWAY) ++#endif + + struct route_flag { + const char *name; +@@ -59,15 +65,23 @@ static const struct route_flag route_flags[] = { + FLAG(DYNAMIC), + FLAG(MODIFIED), + FLAG(DONE), ++#ifdef RTF_CLONING + FLAG(CLONING), ++#endif + FLAG(XRESOLVE), ++#ifdef RTF_LLINFO + FLAG(LLINFO), ++#endif + FLAG(STATIC), + FLAG(BLACKHOLE), + FLAG(PROTO2), + FLAG(PROTO1), ++#ifdef RTF_PRCLONING + FLAG(PRCLONING), ++#endif ++#ifdef RTF_WASCLONED + FLAG(WASCLONED), ++#endif + FLAG(PROTO3), + FLAG(PINNED), + FLAG(LOCAL), diff --git a/devel/libpdel/files/patch-ppp_auth_radius.c b/devel/libpdel/files/patch-ppp_auth_radius.c deleted file mode 100644 index 2d32809afa46..000000000000 --- a/devel/libpdel/files/patch-ppp_auth_radius.c +++ /dev/null @@ -1,22 +0,0 @@ ---- ppp/ppp_auth_radius.c.orig Sat Jan 22 06:02:04 2005 -+++ ppp/ppp_auth_radius.c Sun Sep 17 19:55:28 2006 -@@ -44,6 +44,8 @@ - #include "ppp/ppp_auth.h" - #include "ppp/ppp_msoft.h" - -+#include -+ - #include - #include - #include ---- ppp/ppp_auth_radius.c.orig Sun Apr 1 23:13:10 2007 -+++ ppp/ppp_auth_radius.c Sun Apr 1 23:16:01 2007 -@@ -462,7 +462,7 @@ - - /* Compensate for broken servers that leave out the ID byte */ - if (len > 0 && (len < 3 || ((const char *)data)[1] != '=')) { -- ((const char *)data)++; -+ data = (const char *)data + 1; - len--; - } - diff --git a/devel/libpdel/files/patch-ppp_ppp__l2tp__ctrl.c b/devel/libpdel/files/patch-ppp_ppp__l2tp__ctrl.c new file mode 100644 index 000000000000..a44d0a758c42 --- /dev/null +++ b/devel/libpdel/files/patch-ppp_ppp__l2tp__ctrl.c @@ -0,0 +1,29 @@ +--- ppp/ppp_l2tp_ctrl.c.orig 2009-05-13 21:36:03 UTC ++++ ppp/ppp_l2tp_ctrl.c +@@ -167,7 +167,7 @@ struct ppp_l2tp_sess { + u_int16_t peer_id; /* peer session id */ + struct ppp_log *log; /* log */ + ng_ID_t node_id; /* tee node id */ +- char hook[NG_HOOKLEN + 1]; /* session hook name */ ++ char hook[NG_HOOKSIZ]; /* session hook name */ + void *link_cookie; /* opaque link cookie */ + u_int16_t result; /* close result code */ + u_int16_t error; /* close error code */ +@@ -575,7 +575,7 @@ ppp_l2tp_ctrl_create(struct pevent_ctx *ctx, pthread_m + + /* Done */ + *nodep = ctrl->node_id; +- strlcpy(hook, NG_L2TP_HOOK_LOWER, NG_HOOKLEN + 1); ++ strlcpy(hook, NG_L2TP_HOOK_LOWER, NG_HOOKSIZ); + return (ctrl); + + fail: +@@ -1827,7 +1827,7 @@ ppp_l2tp_ctrl_event(void *arg) + struct ng_mesg msg; + } buf; + struct ng_mesg *const msg = &buf.msg; +- char raddr[NG_PATHLEN + 1]; ++ char raddr[NG_PATHSIZ]; + int len; + + /* Read netgraph control message */ diff --git a/devel/libpdel/files/patch-ppp_ppp__l2tp__ctrl.h b/devel/libpdel/files/patch-ppp_ppp__l2tp__ctrl.h new file mode 100644 index 000000000000..3afe75a12a78 --- /dev/null +++ b/devel/libpdel/files/patch-ppp_ppp__l2tp__ctrl.h @@ -0,0 +1,11 @@ +--- ppp/ppp_l2tp_ctrl.h.orig 2009-05-13 21:36:03 UTC ++++ ppp/ppp_l2tp_ctrl.h +@@ -168,7 +168,7 @@ __BEGIN_DECLS + * peer_id Unique identifier for peer (used for tie-breakers) + * initiate Whether to send a SCCRQ or just wait for one + * nodep Pointer to netgraph node ID variable +- * hook Buffer for hook on L2TP netgraph node (size >= NG_HOOKLEN + 1) ++ * hook Buffer for hook on L2TP netgraph node (size >= NG_HOOKSIZ) + * avps List of AVP's to include in the associated + * Start-Control-Connection-Request or + * Start-Control-Connection-Reply control message. diff --git a/devel/libpdel/files/patch-ppp_ppp__l2tp__server.c b/devel/libpdel/files/patch-ppp_ppp__l2tp__server.c new file mode 100644 index 000000000000..cf8496b48e95 --- /dev/null +++ b/devel/libpdel/files/patch-ppp_ppp__l2tp__server.c @@ -0,0 +1,20 @@ +--- ppp/ppp_l2tp_server.c.orig 2009-05-13 21:36:03 UTC ++++ ppp/ppp_l2tp_server.c +@@ -70,7 +70,7 @@ struct ppp_l2tp_peer { + struct ppp_channel *chan; /* pointer to channel */ + struct ppp_auth_config auth; /* auth config */ + char node[32]; /* node path */ +- char hook[NG_HOOKLEN + 1]; /* node hook */ ++ char hook[NG_HOOKSIZ]; /* node hook */ + char logname[32]; /* peer logname */ + struct in_addr ip; /* peer ip address */ + u_int16_t port; /* peer port */ +@@ -503,7 +503,7 @@ ppp_l2tp_server_sock_event(void *arg) + struct sockaddr_in sin; + const size_t bufsize = 8192; + u_int16_t *buf = NULL; +- char hook[NG_HOOKLEN + 1]; ++ char hook[NG_HOOKSIZ]; + socklen_t sin_len; + char namebuf[64]; + ng_ID_t node_id; diff --git a/devel/libpdel/files/patch-ppp_ppp__msoft.c b/devel/libpdel/files/patch-ppp_ppp__msoft.c index fa1dd85a5328..afe604187ebe 100644 --- a/devel/libpdel/files/patch-ppp_ppp__msoft.c +++ b/devel/libpdel/files/patch-ppp_ppp__msoft.c @@ -1,6 +1,6 @@ ---- ppp/ppp_msoft.c.orig 2005-01-21 22:02:07.000000000 +0100 -+++ ppp/ppp_msoft.c 2015-01-24 13:42:43.120485776 +0100 -@@ -163,14 +163,14 @@ +--- ppp/ppp_msoft.c.orig 2009-05-13 21:36:03 UTC ++++ ppp/ppp_msoft.c +@@ -130,14 +130,14 @@ ppp_msoft_challenge_response(const u_char *chal, static void ppp_msoft_des_encrypt(const u_char *clear, u_char *key0, u_char *cypher) { @@ -17,7 +17,7 @@ * algorithm may care though. */ key[0] = key0[0] & 0xfe; -@@ -181,10 +181,10 @@ +@@ -148,10 +148,10 @@ ppp_msoft_des_encrypt(const u_char *clear, u_char *key key[5] = (key0[4] << 3) | (key0[5] >> 5); key[6] = (key0[5] << 2) | (key0[6] >> 6); key[7] = key0[6] << 1; diff --git a/devel/libpdel/files/patch-ppp_ppp__node.c b/devel/libpdel/files/patch-ppp_ppp__node.c new file mode 100644 index 000000000000..88df314e2ba6 --- /dev/null +++ b/devel/libpdel/files/patch-ppp_ppp__node.c @@ -0,0 +1,20 @@ +--- ppp/ppp_node.c.orig 2009-05-13 21:36:03 UTC ++++ ppp/ppp_node.c +@@ -398,7 +398,7 @@ int + ppp_node_send_msg(struct ppp_node *node, const char *relpath, + u_int32_t cookie, u_int32_t cmd, const void *payload, size_t plen) + { +- char path[NG_PATHLEN + 1]; ++ char path[NG_PATHSIZ]; + + if (relpath == NULL) + strlcpy(path, NODE_HOOK, sizeof(path)); +@@ -465,7 +465,7 @@ ppp_node_read_message(void *arg) + { + struct ppp_node *const node = arg; + const size_t max_msglen = 4096; +- char raddr[NG_PATHLEN + 1]; ++ char raddr[NG_PATHSIZ]; + struct ppp_node_recvmsg *rm; + struct ng_mesg *msg; + int found = 0; diff --git a/devel/libpdel/files/patch-rsa_util.c b/devel/libpdel/files/patch-rsa_util.c deleted file mode 100644 index a49cd9022a40..000000000000 --- a/devel/libpdel/files/patch-rsa_util.c +++ /dev/null @@ -1,10 +0,0 @@ ---- util/rsa_util.c.orig Sat Jan 22 06:02:19 2005 -+++ util/rsa_util.c Sun Sep 17 19:58:23 2006 -@@ -50,6 +50,7 @@ - - #include - #include -+#include - - #include "structs/structs.h" - #include "structs/type/array.h" diff --git a/devel/libpdel/files/patch-sys_fs__mount.c b/devel/libpdel/files/patch-sys_fs__mount.c new file mode 100644 index 000000000000..35fe48d2aede --- /dev/null +++ b/devel/libpdel/files/patch-sys_fs__mount.c @@ -0,0 +1,11 @@ +--- sys/fs_mount.c.orig 2009-05-13 21:36:05 UTC ++++ sys/fs_mount.c +@@ -9,6 +9,8 @@ + #include + #include + ++#include ++#include + #include + + #include diff --git a/devel/libpdel/files/patch-util_paction.c b/devel/libpdel/files/patch-util_paction.c deleted file mode 100644 index d88c55a9ffc9..000000000000 --- a/devel/libpdel/files/patch-util_paction.c +++ /dev/null @@ -1,54 +0,0 @@ ---- util/paction.c (revision 68) -+++ util/paction.c (working copy) -@@ -39,7 +39,7 @@ - #endif - paction_finish_t *finish; /* action finisher */ - void *arg; /* action argument */ -- u_char started; /* action thread started */ -+ u_char may_cancel; /* ok to cancel action thread */ - u_char canceled; /* action was canceled */ - }; - -@@ -118,10 +118,11 @@ - - /* - * Don't cancel the thread before paction_main() starts, because -- * then paction_cleanup() would never get invoked. Instead, use -- * the 'started' and 'canceled' flags to avoid this race condition. -+ * then paction_cleanup() would never get invoked. Also don't -+ * pthread_cancel() the thread after the handler has completed, -+ * because we might cancel in the middle of the cleanup. - */ -- if (action->started) -+ if (action->may_cancel) - pthread_cancel(action->tid); - - /* Unlock action */ -@@ -139,9 +140,9 @@ - /* Cleanup when thread exits */ - pthread_cleanup_push(paction_cleanup, action); - -- /* Mark thread as started */ -- assert(!action->started); -- action->started = 1; /* race condition ok */ -+ /* Begin allowing pthread_cancel()'s */ -+ assert(!action->may_cancel); -+ action->may_cancel = 1; - - /* Handle race between paction_cancel() and paction_main() */ - if (action->canceled) /* race condition ok */ -@@ -151,6 +152,14 @@ - (*action->handler)(action->arg); - - done:; -+ /* Stop allowing pthread_cancel()'s */ -+ MUTEX_LOCK(&action->mutex, action->mutex_count); -+ action->may_cancel = 0; -+ MUTEX_UNLOCK(&action->mutex, action->mutex_count); -+ -+ /* Consume any last-minute pthread_cancel() still pending */ -+ pthread_testcancel(); -+ - /* Done */ - pthread_cleanup_pop(1); - return (NULL); diff --git a/devel/libpdel/files/patch-util_pevent.c b/devel/libpdel/files/patch-util_pevent.c index b01c238ebff4..1d50ab903e3c 100644 --- a/devel/libpdel/files/patch-util_pevent.c +++ b/devel/libpdel/files/patch-util_pevent.c @@ -1,7 +1,7 @@ ---- util/pevent.c.orig 2005-01-21 23:02:19.000000000 +0200 -+++ util/pevent.c 2007-11-11 16:06:04.000000000 +0200 -@@ -155,6 +155,15 @@ - _pevent_unref(ev); \ +--- util/pevent.c.orig 2009-05-13 21:36:05 UTC ++++ util/pevent.c +@@ -147,6 +147,15 @@ struct pevent { + } \ } while (0) +#define PEVENT_SET_OCCURRED(ctx, ev) \ @@ -16,9 +16,9 @@ /* Internal functions */ static void pevent_ctx_service(struct pevent *ev); static void *pevent_ctx_main(void *arg); -@@ -338,7 +347,11 @@ +@@ -336,7 +345,11 @@ pevent_register(struct pevent_ctx *ctx, struct pevent ev->u.millis = 0; - gettimeofday(&ev->when, NULL); + pd_gettimeofday(&ev->when, NULL); ev->when.tv_sec += ev->u.millis / 1000; - ev->when.tv_usec += ev->u.millis % 1000; + ev->when.tv_usec += (ev->u.millis % 1000) * 1000; @@ -29,7 +29,7 @@ break; case PEVENT_MESG_PORT: va_start(args, type); -@@ -394,15 +407,16 @@ +@@ -392,15 +405,16 @@ pevent_register(struct pevent_ctx *ctx, struct pevent } else pevent_ctx_notify(ctx); @@ -49,92 +49,17 @@ return (0); } -@@ -469,7 +483,7 @@ - goto done; - - /* Mark event as having occurred */ -- ev->flags |= PEVENT_OCCURRED; -+ PEVENT_SET_OCCURRED(ctx, ev); - - /* Wake up thread if event is still in the queue */ - if ((ev->flags & PEVENT_ENQUEUED) != 0) -@@ -523,6 +537,7 @@ - struct timeval now; - struct pollfd *fd; - struct pevent *ev; -+ struct pevent *next_ev; - int poll_idx; - int timeout; - int r; -@@ -562,6 +577,13 @@ - } - } - +@@ -565,6 +579,13 @@ loop: + if (ctx->notified) { + DBG(PEVENT, "ctx %p thread was notified", ctx); + (void)pd_read(ctx->pipe[0], &pevent_byte, 1); ++ ctx->notified = 0; ++ } ++ + /* If we were intentionally woken up, read the wakeup byte */ + if (ctx->notified) { + DBG(PEVENT, "ctx %p thread was notified", ctx); + (void)read(ctx->pipe[0], &pevent_byte, 1); -+ ctx->notified = 0; -+ } -+ - /* Add event for the notify pipe */ - poll_idx = 0; - if (ctx->fds_alloc > 0) { -@@ -620,7 +642,7 @@ - switch (ev->type) { - case PEVENT_MESG_PORT: - if (mesg_port_qlen(ev->u.port) > 0) -- ev->flags |= PEVENT_OCCURRED; -+ PEVENT_SET_OCCURRED(ctx, ev); - break; - default: - break; -@@ -654,7 +676,8 @@ - gettimeofday(&now, NULL); - - /* Mark poll() events that have occurred */ -- TAILQ_FOREACH(ev, &ctx->events, next) { -+ for (ev = TAILQ_FIRST((&ctx->events)); ev != NULL; ev = next_ev) { -+ next_ev = TAILQ_NEXT(ev, next); - assert(ev->magic == PEVENT_MAGIC); - switch (ev->type) { - case PEVENT_READ: -@@ -664,33 +687,23 @@ - fd = &ctx->fds[ev->poll_idx]; - if ((fd->revents & ((ev->type == PEVENT_READ) ? - READABLE_EVENTS : WRITABLE_EVENTS)) != 0) -- ev->flags |= PEVENT_OCCURRED; -+ PEVENT_SET_OCCURRED(ctx, ev); - break; - case PEVENT_TIME: - if (timercmp(&ev->when, &now, <=)) -- ev->flags |= PEVENT_OCCURRED; -+ PEVENT_SET_OCCURRED(ctx, ev); - break; - default: - break; - } + ctx->notified = 0; } -- /* If we were intentionally woken up, read the wakeup byte */ -- if (ctx->notified) { -- DBG(PEVENT, "ctx %p thread was notified", ctx); -- (void)read(ctx->pipe[0], &pevent_byte, 1); -- ctx->notified = 0; -- } -- - /* Service all events that are marked as having occurred */ - while (1) { - -- /* Find next event that needs service XXX this is O(n^2) XXX */ -- TAILQ_FOREACH(ev, &ctx->events, next) { -- if ((ev->flags & PEVENT_OCCURRED) != 0) -- break; -- } -- if (ev == NULL) -+ /* Find next event that needs service */ -+ ev = TAILQ_FIRST(&ctx->events); -+ if (ev == NULL || (ev->flags & PEVENT_OCCURRED) == 0) - break; - DBG(PEVENT, "ctx %p thread servicing ev %p", ctx, ev); - diff --git a/devel/libpdel/pkg-plist b/devel/libpdel/pkg-plist index b66d7830e141..d1cc55b519b1 100644 --- a/devel/libpdel/pkg-plist +++ b/devel/libpdel/pkg-plist @@ -17,10 +17,23 @@ include/pdel/io/filter.h include/pdel/io/ssl_fp.h include/pdel/io/string_fp.h include/pdel/io/timeout_fp.h +include/pdel/net/domain_server.h include/pdel/net/if_util.h include/pdel/net/route_msg.h include/pdel/net/tcp_server.h include/pdel/net/uroute.h +include/pdel/pd_base.h +include/pdel/pd_inet.h +include/pdel/pd_io.h +include/pdel/pd_mem.h +include/pdel/pd_poll.h +include/pdel/pd_port.h +include/pdel/pd_regex.h +include/pdel/pd_string.h +include/pdel/pd_sys.h +include/pdel/pd_syslog.h +include/pdel/pd_thread.h +include/pdel/pd_time.h include/pdel/ppp/ppp_auth.h include/pdel/ppp/ppp_auth_chap.h include/pdel/ppp/ppp_auth_radius.h @@ -38,6 +51,7 @@ include/pdel/ppp/ppp_msoft.h include/pdel/ppp/ppp_pptp_server.h include/pdel/structs/structs.h include/pdel/structs/type/array.h +include/pdel/structs/type/array_define.h include/pdel/structs/type/boolean.h include/pdel/structs/type/bpf.h include/pdel/structs/type/data.h @@ -74,7 +88,7 @@ include/pdel/util/typed_mem.h include/pdel/version.h lib/libpdel.a lib/libpdel.so -lib/libpdel.so.0 +lib/libpdel.so.6 man/man3/ASPRINTF.3.gz man/man3/BPF_STRUCTS_TYPE.3.gz man/man3/CALLOC.3.gz @@ -135,6 +149,15 @@ man/man3/b64_rfc2045_charset.3.gz man/man3/base64.3.gz man/man3/boundary_fopen.3.gz man/man3/count_fopen.3.gz +man/man3/domain_connection_get_cookie.3.gz +man/man3/domain_connection_get_fd.3.gz +man/man3/domain_connection_get_fp.3.gz +man/man3/domain_connection_get_peer.3.gz +man/man3/domain_connection_get_server.3.gz +man/man3/domain_server.3.gz +man/man3/domain_server_get_cookie.3.gz +man/man3/domain_server_start.3.gz +man/man3/domain_server_stop.3.gz man/man3/filter.3.gz man/man3/filter_convert.3.gz man/man3/filter_destroy.3.gz