From b4c1d4c02b6b5f15faf15b8853e0c63a5519e625 Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Thu, 9 Feb 2017 09:18:11 +0000 Subject: [PATCH 1/4] miniupnpd: add IGDv2 support as build option Make IGDv2 support a build time option (default enabled) Some devices (xbox one, windows home server) are not happy talking to an IGDv2 enabled upnp server. Remove 'portinuse' & 'igdv2' enabling patches backported from freebsd as these can be configured via build time options in package makefile. Signed-off-by: Kevin Darbyshire-Bryant (cherry picked from commit a7ce5a5d60bd2005da8fc5993dcb733290f32eb2) --- miniupnpd/Makefile | 12 +++++++++++- miniupnpd/patches/105-enable_check_portinuse.patch | 11 ----------- miniupnpd/patches/106-enable_igdv2.patch | 11 ----------- 3 files changed, 11 insertions(+), 23 deletions(-) delete mode 100644 miniupnpd/patches/105-enable_check_portinuse.patch delete mode 100644 miniupnpd/patches/106-enable_igdv2.patch diff --git a/miniupnpd/Makefile b/miniupnpd/Makefile index fdfac91..5537e2c 100644 --- a/miniupnpd/Makefile +++ b/miniupnpd/Makefile @@ -29,6 +29,13 @@ define Package/miniupnpd URL:=http://miniupnp.free.fr/ endef +define Package/miniupnpd/config +config MINIUPNPD_IGDv2 + bool + default y + prompt "Enable IGDv2" +endef + define Package/miniupnpd/conffiles /etc/config/upnpd endef @@ -54,10 +61,13 @@ MAKE_FLAGS += \ LIBS="" \ CC="$(TARGET_CC) -DIPTABLES_143 \ -lip4tc $(if $(CONFIG_IPV6),-lip6tc) -luuid" \ - CONFIG_OPTIONS="$(if $(CONFIG_IPV6),--ipv6) --leasefile" \ + CONFIG_OPTIONS="--portinuse --leasefile \ + $(if $(CONFIG_IPV6),--ipv6) \ + $(if $(CONFIG_MINIUPNPD_IGDv2),--igd2)" \ -f Makefile.linux \ miniupnpd + define Package/miniupnpd/install $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config $(1)/etc/uci-defaults $(1)/etc/hotplug.d/iface $(1)/usr/share/miniupnpd $(INSTALL_BIN) $(PKG_BUILD_DIR)/miniupnpd $(1)/usr/sbin/miniupnpd diff --git a/miniupnpd/patches/105-enable_check_portinuse.patch b/miniupnpd/patches/105-enable_check_portinuse.patch deleted file mode 100644 index 8bf6c33..0000000 --- a/miniupnpd/patches/105-enable_check_portinuse.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/genconfig.sh -+++ b/genconfig.sh -@@ -467,7 +467,7 @@ echo "/* Uncomment the following line to - if [ -n "$PORTINUSE" ]; then - echo "#define CHECK_PORTINUSE" >> ${CONFIGFILE} - else -- echo "/*#define CHECK_PORTINUSE*/" >> ${CONFIGFILE} -+ echo "#define CHECK_PORTINUSE" >> ${CONFIGFILE} - fi - echo "" >> ${CONFIGFILE} - diff --git a/miniupnpd/patches/106-enable_igdv2.patch b/miniupnpd/patches/106-enable_igdv2.patch deleted file mode 100644 index 26811a0..0000000 --- a/miniupnpd/patches/106-enable_igdv2.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/genconfig.sh -+++ b/genconfig.sh -@@ -516,7 +516,7 @@ echo " * control points, so enable with - if [ -n "$IGD2" ]; then - echo "#define IGD_V2" >> ${CONFIGFILE} - else -- echo "/*#define IGD_V2*/" >> ${CONFIGFILE} -+ echo "#define IGD_V2" >> ${CONFIGFILE} - fi - echo "" >> ${CONFIGFILE} - From 471d3660b413366a400bd6439cdfba9ab027b92a Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Sat, 11 Feb 2017 19:13:29 +0000 Subject: [PATCH 2/4] miniupnpd: implement an 'enabled' flag Add a 'master' miniupnpd service enable flag rather than just relying on rcS.d script existence. This allows the service to be disabled across sysupgrade, similar to minidlna. The service assumes enabled if no 'enabled' config flag is configured for backwards compatibility. Signed-off-by: Kevin Darbyshire-Bryant (cherry picked from commit 33dc373da9b24547d2bc30e9038ffdb97cb41744) --- miniupnpd/files/miniupnpd.init | 6 +++++- miniupnpd/files/upnpd.config | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/miniupnpd/files/miniupnpd.init b/miniupnpd/files/miniupnpd.init index c7dc6a2..c934a28 100644 --- a/miniupnpd/files/miniupnpd.init +++ b/miniupnpd/files/miniupnpd.init @@ -68,7 +68,11 @@ start() { local extip port usesysuptime conffile serial_number model_number local uuid notify_interval presentation_url enable_upnp local upnp_lease_file clean_ruleset_threshold clean_ruleset_interval - local ipv6_listening_ip + local ipv6_listening_ip enabled + + config_get_bool enabled config enabled 1 + + [ "$enabled" -gt 0 ] || return 1 config_get extiface config external_iface config_get extzone config external_zone diff --git a/miniupnpd/files/upnpd.config b/miniupnpd/files/upnpd.config index 56cde57..9a65bfa 100644 --- a/miniupnpd/files/upnpd.config +++ b/miniupnpd/files/upnpd.config @@ -1,4 +1,5 @@ config upnpd config + option enabled 0 option enable_natpmp 1 option enable_upnp 1 option secure_mode 1 From 4d06ab99b4b1f3528df4da27429f9257459379b1 Mon Sep 17 00:00:00 2001 From: Daniel Engberg Date: Wed, 31 May 2017 12:33:40 +0200 Subject: [PATCH 3/4] miniupnpd: Update to 2.0.20170421 Update miniupnpd to 2.0.20170421 Signed-off-by: Daniel Engberg (cherry picked from commit 1d5b485138954c7dce19c1b26b149d694f1b823c) --- miniupnpd/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniupnpd/Makefile b/miniupnpd/Makefile index 5537e2c..42023ff 100644 --- a/miniupnpd/Makefile +++ b/miniupnpd/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=miniupnpd -PKG_VERSION:=2.0.20161216 +PKG_VERSION:=2.0.20170421 PKG_RELEASE:=1 PKG_SOURCE_URL:=http://miniupnp.free.fr/files PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=9e73d50ac830b5e08b6eb1df4e4c917833a5ab54351809f615d15d0f30cdeef3 +PKG_HASH:=9677aeccadf73b4bf8bb9d832c32b5da8266b4d58eed888f3fd43d7656405643 PKG_MAINTAINER:=Markus Stenberg PKG_LICENSE:=BSD-3-Clause From 3e916a365214a6700a636bac551c41c8f57db7b3 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 3 Jul 2017 11:36:55 +0200 Subject: [PATCH 4/4] miniupnpd: disable IGDv2 by default The upstream project also reverted IGDv2-by-default due to widespread compatibility problems. So far all Microsoft operating systems up to Windows 10, Xbox 360, Xbox One Playstation 3 and Playstation 4 consoles seem to be incompatible to the new 2.0 standard. Signed-off-by: Jo-Philipp Wich (cherry picked from commit 7ddbedb649896404871814c0aa4211a09ba2efdd) --- miniupnpd/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniupnpd/Makefile b/miniupnpd/Makefile index 42023ff..1841200 100644 --- a/miniupnpd/Makefile +++ b/miniupnpd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=miniupnpd PKG_VERSION:=2.0.20170421 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://miniupnp.free.fr/files PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz @@ -32,7 +32,7 @@ endef define Package/miniupnpd/config config MINIUPNPD_IGDv2 bool - default y + default n prompt "Enable IGDv2" endef