From 4d824243e6330b44ce42cbacf6a0898db5ff572f Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 17 Nov 2020 21:33:46 -0800 Subject: [PATCH 1/2] miniupnpd: update to 2.2.0 Replace daemon patch with upstream solution. Signed-off-by: Rosen Penev --- net/miniupnpd/Makefile | 10 +++++---- net/miniupnpd/patches/100-no-daemon.patch | 25 ----------------------- 2 files changed, 6 insertions(+), 29 deletions(-) delete mode 100644 net/miniupnpd/patches/100-no-daemon.patch diff --git a/net/miniupnpd/Makefile b/net/miniupnpd/Makefile index 8a6f0d4f4..44a367e58 100644 --- a/net/miniupnpd/Makefile +++ b/net/miniupnpd/Makefile @@ -8,13 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=miniupnpd -PKG_VERSION:=2.1.20200510 -PKG_RELEASE:=5 +PKG_VERSION:=2.2.0 +PKG_RELEASE:=1 PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=821e708f369cc1fb851506441fbc3a1f4a1b5a8bf8e84a9e71758a32f5127e8b +PKG_HASH:=f105210a13ed0ebfc649f661ecc59e0a072cc547b04977851f22b5521b4cadff +PKG_MAINTAINER:= PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE PKG_CPE_ID:=cpe:/a:miniupnp_project:miniupnpd @@ -48,7 +49,8 @@ CONFIGURE_ARGS = \ --igd2 \ --leasefile \ --portinuse \ - --firewall=iptables + --firewall=iptables \ + --disable-fork TARGET_CFLAGS += $(FPIC) -flto TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed diff --git a/net/miniupnpd/patches/100-no-daemon.patch b/net/miniupnpd/patches/100-no-daemon.patch deleted file mode 100644 index 9b9c26daa..000000000 --- a/net/miniupnpd/patches/100-no-daemon.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/miniupnpd.c -+++ b/miniupnpd.c -@@ -1769,21 +1769,7 @@ init(int argc, char * * argv, struct run - } - } - -- if(debug_flag) -- { -- pid = getpid(); -- } -- else -- { --#ifdef USE_DAEMON -- if(daemon(0, 0)<0) { -- perror("daemon()"); -- } -- pid = getpid(); --#else -- pid = daemonize(); --#endif -- } -+ pid = getpid(); - - openlog_option = LOG_PID|LOG_CONS; - if(debug_flag) From 773b87977eb176a15f18d31c71987a398d34ee70 Mon Sep 17 00:00:00 2001 From: Marco Martins Date: Thu, 19 Nov 2020 21:53:31 +0000 Subject: [PATCH 2/2] miniupnpd: Added chain rule to filter table so udp stun incoming connections rules works Signed-off-by: Marco Martins --- net/miniupnpd/files/firewall.include | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/miniupnpd/files/firewall.include b/net/miniupnpd/files/firewall.include index 97908af22..911e0675c 100644 --- a/net/miniupnpd/files/firewall.include +++ b/net/miniupnpd/files/firewall.include @@ -31,13 +31,15 @@ add_extzone_rules() { [ -z "$ext_zone" ] && return # IPv4 - due to NAT, need to add both to nat and filter table - # need to insert as penultimate rule for forward & postrouting since final rule might be a fw3 REJECT + # need to insert as penultimate rule for input & forward & postrouting since final rule might be a fw3 REJECT + iptables_prepend_rule "$IPTABLES" filter "zone_${ext_zone}_input" MINIUPNPD iptables_prepend_rule "$IPTABLES" filter "zone_${ext_zone}_forward" MINIUPNPD $IPTABLES -t nat -A "zone_${ext_zone}_prerouting" -j MINIUPNPD iptables_prepend_rule "$IPTABLES" nat "zone_${ext_zone}_postrouting" MINIUPNPD-POSTROUTING # IPv6 if available - filter only [ -x $IP6TABLES ] && { + iptables_prepend_rule "$IP6TABLES" filter "zone_${ext_zone}_input" MINIUPNPD iptables_prepend_rule "$IP6TABLES" filter "zone_${ext_zone}_forward" MINIUPNPD } ADDED=$(($ADDED + 1))