miniupnpd: add IGDv2 support as build option 275/head
authorKevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
Thu, 9 Feb 2017 09:18:11 +0000 (09:18 +0000)
committerKevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
Sun, 12 Feb 2017 08:45:24 +0000 (08:45 +0000)
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 <kevin@darbyshire-bryant.me.uk>
miniupnpd/Makefile
miniupnpd/patches/105-enable_check_portinuse.patch [deleted file]
miniupnpd/patches/106-enable_igdv2.patch [deleted file]

index fdfac91262d5c0540b6ac6bcf48a56ea9a383744..5537e2c886f711f0dbe696cac1a63f6c4553a065 100644 (file)
@@ -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 (file)
index 8bf6c33..0000000
+++ /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 (file)
index 26811a0..0000000
+++ /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}