diff --git a/net/miniupnpd/Makefile b/net/miniupnpd/Makefile index 64004490004..f4e210bcc9b 100644 --- a/net/miniupnpd/Makefile +++ b/net/miniupnpd/Makefile @@ -1,13 +1,17 @@ PORTNAME= miniupnpd -DISTVERSION= 2.3.9 -PORTREVISION= 2 +DISTVERSION= 2.3.11 PORTEPOCH= 1 CATEGORIES= net -MASTER_SITES= http://miniupnp.free.fr/files/ \ +MASTER_SITES= https://miniupnp.tuxfamily.org/files/ \ https://github.com/miniupnp/miniupnp/releases/download/${PORTNAME}_${DISTVERSION:S|.|_|g}/ -PATCH_SITES= https://github.com/miniupnp/miniupnp/commit/ -PATCHFILES= 7949a7acb3b8471681157863387339ea2ca749fb.patch:-p2 +PATCH_SITES= https://github.com/Self-Hosting-Group/miniupnp/commit/ +# miniupnpd: UPnP IGDv2 Microsoft/Apple compatibility +PATCHFILES= f94e5bf7a60a41911af8d7e23cdb4ebe166257e2.patch:-p2 +# miniupnpd: Improve start banner and add security warnings +PATCHFILES+= 266d2bd9710af90c5a6f0cccc4669c1413443337.patch:-p2 +# miniupnpd: Less excessive logging by default +PATCHFILES+= a7cebfc522306295cc1745c637f64d0e7d659795.patch:-p2 MAINTAINER= squat@squat.no COMMENT= Lightweight UPnP IGD & PCP/NAT-PMP daemon which uses pf @@ -24,7 +28,7 @@ USE_RC_SUBR= ${PORTNAME} HAS_CONFIGURE= yes # unconditionally use pf, ipfw does not work on FreeBSD -CONFIGURE_ARGS= --firewall=pf --libpfctl --vendorcfg +CONFIGURE_ARGS= --disable-pppconn --firewall=pf --libpfctl --vendorcfg MAKE_ENV= MANPREFIX=${PREFIX}/share MAKE_JOBS_UNSAFE= yes @@ -32,19 +36,16 @@ PLIST_FILES= etc/miniupnpd.conf.sample \ share/man/man8/miniupnpd.8.gz \ sbin/miniupnpd -OPTIONS_DEFINE= CHECK_PORTINUSE IPV6 LEASEFILE UPNP_IGDV2 \ - UPNP_NOPPP UPNP_STRICT +OPTIONS_DEFINE= CHECK_PORTINUSE IPV6 LEASEFILE UPNP_IGDV2 UPNP_STRICT CHECK_PORTINUSE_DESC= Check if ports are in use LEASEFILE_DESC= Enable lease file UPNP_IGDV2_DESC= Build an IGDv2 instead of an IGDv1 -UPNP_NOPPP_DESC= No old/IGDv1-only extra WANPPPConnection SSDP announcements workaround UPNP_STRICT_DESC= More strict UPnP specification compliance CHECK_PORTINUSE_CONFIGURE_ON= --portinuse IPV6_CONFIGURE_ON= --ipv6 LEASEFILE_CONFIGURE_ON= --leasefile UPNP_IGDV2_CONFIGURE_ON= --igd2 -UPNP_NOPPP_CONFIGURE_ON= --disable-pppconn UPNP_STRICT_CONFIGURE_ON= --strict .include diff --git a/net/miniupnpd/distinfo b/net/miniupnpd/distinfo index c16f378977c..e8473780802 100644 --- a/net/miniupnpd/distinfo +++ b/net/miniupnpd/distinfo @@ -1,5 +1,9 @@ -TIMESTAMP = 1763942400 -SHA256 (miniupnpd-2.3.9.tar.gz) = 66cb3c3d697ab2bb3a61d3c48628166d6ba328d7c2dbeb95898fdf2a3202af7b -SIZE (miniupnpd-2.3.9.tar.gz) = 302607 -SHA256 (7949a7acb3b8471681157863387339ea2ca749fb.patch) = 492399388049c5f0b51251074814a6782f8e5cebf2e5ced04561e45270bba53f -SIZE (7949a7acb3b8471681157863387339ea2ca749fb.patch) = 3181 +TIMESTAMP = 1786491927 +SHA256 (miniupnpd-2.3.11.tar.gz) = 91994b127da735b2c97f19992e34420648c0e8c4ace8a4bcb0596e7685c48678 +SIZE (miniupnpd-2.3.11.tar.gz) = 308180 +SHA256 (f94e5bf7a60a41911af8d7e23cdb4ebe166257e2.patch) = f1cb8faa51828cb1feb1840259904c5479f4bf4e478648558f9a0aaf63ae7bef +SIZE (f94e5bf7a60a41911af8d7e23cdb4ebe166257e2.patch) = 3956 +SHA256 (266d2bd9710af90c5a6f0cccc4669c1413443337.patch) = 42bca5ab60a7dcafd902b80c4c86f49c2e31b457ab5325fc602b24bc7d2c0fb2 +SIZE (266d2bd9710af90c5a6f0cccc4669c1413443337.patch) = 6154 +SHA256 (a7cebfc522306295cc1745c637f64d0e7d659795.patch) = da5f2dfa6fd03d6b78470722e7f26560883357f8ea449d311bd72e48041a7b75 +SIZE (a7cebfc522306295cc1745c637f64d0e7d659795.patch) = 44704 diff --git a/net/miniupnpd/files/patch-upnp-igdv2-compat.patch b/net/miniupnpd/files/patch-upnp-igdv2-compat.patch deleted file mode 100644 index 230b8297689..00000000000 --- a/net/miniupnpd/files/patch-upnp-igdv2-compat.patch +++ /dev/null @@ -1,75 +0,0 @@ -From edd7e856c09b5ba2e2c5774768e3ed752d33feff Mon Sep 17 00:00:00 2001 -From: Self-Hosting-Group - <155233284+Self-Hosting-Group@users.noreply.github.com> -Date: Thu, 27 Nov 2025 00:00:00 +0000 -Subject: [PATCH] miniupnpd: UPnP IGDv2 Microsoft/Apple compatibility - -- Add workaround to list port maps with the Windows IGDv2-incompatible - client by returning an infinite (0) lease duration. To fix listing and - editing via GUI (Explorer/Network), if daemon was compiled with IGDv2 -- Extend detection to older versions of Windows and add Xbox -- Detect Apple IGDv2-incompatible clients and apply existing workaround, - that only caused problems if PCP/NAT-PMP (prioritised) was disabled - -Link: https://github.com/Self-Hosting-Group/miniupnp/tree/upnp-igdv2-compat - ---- upnphttp.c -+++ upnphttp.c -@@ -303,9 +303,22 @@ ParseHttpHeaders(struct upnphttp * h) - } - else if(strncasecmp(line, "user-agent:", 11) == 0) - { -- /* - User-Agent: Microsoft-Windows/10.0 UPnP/1.0 -- * - User-Agent: FDSSDP */ -- if(strcasestr(line + 11, "microsoft") != NULL || strstr(line + 11, "FDSSDP") != NULL) { -+ /* Detect Microsoft UPnP IGDv2-incompatible clients that only support IGDv1 routers, -+ * and Windows requires extra UDA 1.x (Win XP 1.0), via User-Agent SOAP/HTTP header: -+ * - FDSSDP (Win >=Vista for GET) -+ * - Microsoft-Windows/10.0 UPnP/1.0 (Win >=10 for POST) -+ * - Microsoft-Windows/6.1 UPnP/1.0 (Win 7 for GET/POST) -+ * - Mozilla/4.0 (compatible; UPnP/1.0; Windows NT/5.1) (Win XP/Vista for GET) -+ * - Mozilla/4.0 (compatible; UPnP/1.0; Windows 9x) (Win XP/Vista for POST) -+ * - Xbox/2.0.17559.0 UPnP/1.0 Xbox/2.0.17559.0 (for GET/POST) -+ * Detect Apple UPnP IGDv2-incompatible clients that only support IGDv1 routers: -+ * - Mozilla/4.0 (compatible; UPnP/1.0; Windows NT/5.1) (for GET) -+ * - Mozilla/4.0 (compatible; UPnP/1.0; Windows 9x) (for POST) */ -+ if (((strstr(line + 11, "Microsoft-Windows/") != NULL || -+ strstr(line + 11, "Xbox/") != NULL) && -+ strstr(line + 11, " UPnP/1.0") != NULL) || -+ strstr(line + 11, "FDSSDP") != NULL || -+ strstr(line + 11, "Mozilla/4.0 (compatible; UPnP/1.0; Windows") != NULL) { - h->respflags |= FLAG_MS_CLIENT; - } - } ---- upnpsoap.c -+++ upnpsoap.c -@@ -853,6 +853,14 @@ GetSpecificPortMappingEntry(struct upnphttp * h, const char * action, const char - (unsigned int)iport, desc, leaseduration); - #ifdef ENABLE_PCP - hide_pcp_nonce(desc); -+#endif -+#ifdef IGD_V2 -+ /* Workaround to list port maps with the Windows IGDv2-incompatible client -+ * by returning an infinite (0) lease duration. To fix listing and editing -+ * via GUI (Explorer/Network), if daemon was compiled with IGDv2 */ -+ if (h->respflags & FLAG_MS_CLIENT) { -+ leaseduration = 0; -+ } - #endif - bodylen = snprintf(body, sizeof(body), resp, - action, ns/*SERVICE_TYPE_WANIPC*/, -@@ -1123,6 +1131,14 @@ GetGenericPortMappingEntry(struct upnphttp * h, const char * action, const char - char body[2048]; - #ifdef ENABLE_PCP - hide_pcp_nonce(desc); -+#endif -+#ifdef IGD_V2 -+ /* Workaround to list port maps with the Windows IGDv2-incompatible client -+ * by returning an infinite (0) lease duration. To fix listing and editing -+ * via GUI (Explorer/Network), if daemon was compiled with IGDv2 */ -+ if (h->respflags & FLAG_MS_CLIENT) { -+ leaseduration = 0; -+ } - #endif - bodylen = snprintf(body, sizeof(body), resp, - action, ns, /*SERVICE_TYPE_WANIPC,*/ rhost,