Import miniupnpd from routing repo and bump to 20180422. Drop 102-ipv6-ext-port.patch as this looks upstreamed in the pinhole code to me. Consolidate all other patches & update with a view to sending upstream. Add support for runtime IGDv1 mode switch (default to IGDv2) (not extensively) Tested-on: ar71xx Archer C7 v2 in IGDv1 compatibility mode. A variety of devices/applications appear to be able to create mappings. Have an attempt at resolving https://github.com/openwrt-routing/packages/issues/286 TL;DR miniupnpd rules get processed before fw3 rules and thus can override existing/intended redirects. Ideally the miniupnpd rules would be last in the relevant chains, unfortunately fw3 can sometimes use the last rule as a REJECT. Put miniupnpd rules as penultimate. Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
58 lines
1.8 KiB
Diff
58 lines
1.8 KiB
Diff
--- a/genconfig.sh
|
|
+++ b/genconfig.sh
|
|
@@ -379,12 +379,19 @@ case $FW in
|
|
esac
|
|
|
|
# UUID API
|
|
-if grep uuid_create /usr/include/uuid.h > /dev/null 2>&1 ; then
|
|
- echo "#define BSD_UUID" >> ${CONFIGFILE}
|
|
-fi
|
|
-if grep uuid_generate /usr/include/uuid/uuid.h > /dev/null 2>&1 ; then
|
|
- echo "#define LIB_UUID" >> ${CONFIGFILE}
|
|
-fi
|
|
+case $OS_NAME in
|
|
+ OpenWRT)
|
|
+ echo "#define LIB_UUID" >> ${CONFIGFILE}
|
|
+ ;;
|
|
+ *)
|
|
+ if grep uuid_create /usr/include/uuid.h > /dev/null 2>&1 ; then
|
|
+ echo "#define BSD_UUID" >> ${CONFIGFILE}
|
|
+ fi
|
|
+ if grep uuid_generate /usr/include/uuid/uuid.h > /dev/null 2>&1 ; then
|
|
+ echo "#define LIB_UUID" >> ${CONFIGFILE}
|
|
+ fi
|
|
+ ;;
|
|
+esac
|
|
|
|
# set V6SOCKETS_ARE_V6ONLY to 0 if it was not set above
|
|
if [ -z "$V6SOCKETS_ARE_V6ONLY" ] ; then
|
|
--- a/Makefile.linux
|
|
+++ b/Makefile.linux
|
|
@@ -73,7 +73,10 @@ CPPFLAGS += -DIPTABLES_143
|
|
endif
|
|
|
|
CFLAGS += $(shell $(PKG_CONFIG) --cflags libiptc)
|
|
+#OpenWrt packager passes correct libraries
|
|
+ifeq ($(TARGET_OPENWRT),)
|
|
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libiptc)
|
|
+endif
|
|
LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L libiptc)
|
|
LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-other libiptc)
|
|
else
|
|
@@ -153,6 +156,8 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
|
|
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libnetfilter_conntrack)
|
|
endif # ($(TEST),1)
|
|
|
|
+# OpenWrt packager disables https server for IGD v2 and hardcodes libuuid support
|
|
+ifeq ($(TARGET_OPENWRT),)
|
|
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libssl)
|
|
|
|
TEST := $(shell $(PKG_CONFIG) --exists uuid && echo 1)
|
|
@@ -161,6 +166,7 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
|
|
else
|
|
$(info please install uuid-dev package / libuuid)
|
|
endif # ($(TEST),1)
|
|
+endif # ($(TARGET_OPENWRT,)
|
|
|
|
TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o
|
|
|