From: Self-Hosting-Group Date: Thu, 18 Dec 2025 00:00:00 +0000 (+0000) Subject: miniupnpd: update to 2.3.9 to fix issues, refresh building X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=70ce349f1c9d915d4f3f49758a3aff2bb83664db;p=openwrt-packages.git miniupnpd: update to 2.3.9 to fix issues, refresh building - Update daemon to 2.3.9 to fix removal of nftables rules in `upnp_forward` and return the correct internal port; also resulted in the excessive opening of new ports. Accept interface names starting with digits - Build from GitHub releases to get a reliable HTTPS server, as the HTTP-only/HTTPS mirror were only available ~85%/77% over 3 months https://redirect.github.com/miniupnp/miniupnp/issues/770 https://stats.uptimerobot.com/DwGDxUB914 - Build daemon with `--disable-pppconn` to remove the old/IGDv1-only extra WANPPPConnection SSDP announcements workaround not included in other implementations since >15y - Build daemon with `--vendorcfg` to allow customisation of the router/friendly name (+5 potential options) displayed in Windows Explorer, 384 bytes extra required on ARMv7 (binary) - Remove old (iptables variant only) patches, as no longer needed - Remove `clean_ruleset_interval/threshold` UCI config options as not standard/working since OpenWrt 22.03, as nftables not supported Fixes: https://github.com/openwrt/openwrt/issues/18011 Fixes: https://github.com/openwrt/luci/issues/7759 Fixes: https://github.com/openwrt/packages/issues/26352 Signed-off-by: Self-Hosting-Group [update fixes tag] Signed-off-by: Tianling Shen --- diff --git a/net/miniupnpd/Makefile b/net/miniupnpd/Makefile index c8900c705..c34ca948c 100644 --- a/net/miniupnpd/Makefile +++ b/net/miniupnpd/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=miniupnpd -PKG_VERSION:=2.3.7 +PKG_VERSION:=2.3.9 PKG_RELEASE:=1 -PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files +PKG_SOURCE_URL:=https://github.com/miniupnp/miniupnp/releases/download/miniupnpd_$(subst .,_,$(PKG_VERSION)) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=fbdd5501039730f04a8420ea2f8f54b7df63f9f04cde2dc67fa7371e80477bbe +PKG_HASH:=66cb3c3d697ab2bb3a61d3c48628166d6ba328d7c2dbeb95898fdf2a3202af7b PKG_MAINTAINER:= PKG_LICENSE:=BSD-3-Clause @@ -74,20 +74,24 @@ define Build/Prepare endef CONFIGURE_ARGS = \ - $(if $(CONFIG_IPV6),--ipv6) \ + --disable-fork \ + --disable-pppconn \ + --firewall=$(BUILD_VARIANT) \ --igd2 \ + $(if $(CONFIG_IPV6),--ipv6) \ --leasefile \ --portinuse \ - --firewall=$(BUILD_VARIANT) \ - --disable-fork \ - --regex + --regex \ + --vendorcfg TARGET_CFLAGS += $(FPIC) TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed ifeq ($(BUILD_VARIANT),iptables) +ifeq ($(filter $(ARCH),mips mipsel),) TARGET_CFLAGS += -flto endif +endif define Package/miniupnpd/install/Default $(INSTALL_DIR) $(1)/usr/sbin diff --git a/net/miniupnpd/files/miniupnpd.init b/net/miniupnpd/files/miniupnpd.init index de3504529..15bd2e0f9 100644 --- a/net/miniupnpd/files/miniupnpd.init +++ b/net/miniupnpd/files/miniupnpd.init @@ -61,8 +61,7 @@ upnpd() { local external_iface external_iface6 external_zone external_ip internal_iface local upload download log_output port config_file serial_number model_number local use_stun stun_host stun_port uuid notify_interval presentation_url - local upnp_lease_file clean_ruleset_threshold clean_ruleset_interval - local ipv6_disable + local upnp_lease_file ipv6_disable local enabled config_get_bool enabled config enabled 1 @@ -87,8 +86,6 @@ upnpd() { config_get notify_interval config notify_interval config_get presentation_url config presentation_url config_get upnp_lease_file config upnp_lease_file - config_get clean_ruleset_threshold config clean_ruleset_threshold - config_get clean_ruleset_interval config clean_ruleset_interval config_get ipv6_disable config ipv6_disable 0 local conf ifname ifname6 @@ -156,8 +153,6 @@ upnpd() { [ -n "$upnp_lease_file" ] && touch "$upnp_lease_file" && echo "lease_file=$upnp_lease_file" [ -n "$presentation_url" ] && echo "presentation_url=$presentation_url" [ -n "$notify_interval" ] && echo "notify_interval=$notify_interval" - [ -n "$clean_ruleset_threshold" ] && echo "clean_ruleset_threshold=$clean_ruleset_threshold" - [ -n "$clean_ruleset_interval" ] && echo "clean_ruleset_interval=$clean_ruleset_interval" [ -n "$serial_number" ] && echo "serial=$serial_number" [ -n "$model_number" ] && echo "model_number=$model_number" [ -n "$port" ] && echo "port=$port" diff --git a/net/miniupnpd/patches/200-remove-default-cflags.patch b/net/miniupnpd/patches/200-remove-default-cflags.patch deleted file mode 100644 index 0a1ba0a23..000000000 --- a/net/miniupnpd/patches/200-remove-default-cflags.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/Makefile.linux -+++ b/Makefile.linux -@@ -25,16 +25,16 @@ CONFIG_OPTIONS ?= $(cat .configure.cache - CONFIG_OPTIONS += --firewall=iptables - #CFLAGS = -O -g -DDEBUG - CFLAGS ?= -Os --CFLAGS += -fno-strict-aliasing --CFLAGS += -fno-common --CFLAGS += -fstack-protector -fPIE --CFLAGS += -D_FORTIFY_SOURCE=2 -+#CFLAGS += -fno-strict-aliasing -+#CFLAGS += -fno-common -+#CFLAGS += -fstack-protector -fPIE -+#CFLAGS += -D_FORTIFY_SOURCE=2 - CPPFLAGS += -D_GNU_SOURCE - CFLAGS += -Wall - CFLAGS += -Wextra -Wstrict-prototypes -Wdeclaration-after-statement - #CFLAGS += -Wno-missing-field-initializers - #CFLAGS += -ansi # iptables headers does use typeof which is a gcc extension --LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie -+LDFLAGS ?= -Wl,-z,now -Wl,-z,relro -pie - CC ?= gcc - RM = rm -f - INSTALL = install diff --git a/net/miniupnpd/patches/300-macos-compat.patch b/net/miniupnpd/patches/300-macos-compat.patch deleted file mode 100644 index 8a569f35f..000000000 --- a/net/miniupnpd/patches/300-macos-compat.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/Makefile.linux -+++ b/Makefile.linux -@@ -96,13 +96,13 @@ endif # ($(TEST),1) - endif # ($(TARGET_OPENWRT,) - - ifneq ($(shell ldd --version | grep GLIBC),) --GLIBC_VERSION := $(shell ldd --version | head -n 1 | sed 's/^.* //') --GLIBC_VERSION_MAJOR = $(shell echo $(GLIBC_VERSION) | cut -f 1 -d . ) --GLIBC_VERSION_MINOR = $(shell echo $(GLIBC_VERSION) | cut -f 2 -d . ) -+#GLIBC_VERSION := $(shell ldd --version | head -n 1 | sed 's/^.* //') -+#GLIBC_VERSION_MAJOR = $(shell echo $(GLIBC_VERSION) | cut -f 1 -d . ) -+#GLIBC_VERSION_MINOR = $(shell echo $(GLIBC_VERSION) | cut -f 2 -d . ) - # clock_gettime() needs -lrt when glibc version < 2.17 --LDLIBS += $(shell if [ $(GLIBC_VERSION_MAJOR) -lt 2 ] \ -- || [ \( $(GLIBC_VERSION_MAJOR) -eq 2 \) -a \( $(GLIBC_VERSION_MINOR) -lt 17 \) ] ; \ -- then echo "-lrt" ; fi ) -+#LDLIBS += $(shell if [ $(GLIBC_VERSION_MAJOR) -lt 2 ] \ -+# || [ \( $(GLIBC_VERSION_MAJOR) -eq 2 \) -a \( $(GLIBC_VERSION_MINOR) -lt 17 \) ] ; \ -+# then echo "-lrt" ; fi ) - endif - - TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o