From a7ce5a5d60bd2005da8fc5993dcb733290f32eb2 Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Thu, 9 Feb 2017 09:18:11 +0000 Subject: [PATCH] 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 --- 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} - -- 2.30.2