zerotier: add patch to support miniupnpc 2.2.8
authorMoritz Warning <[email protected]>
Mon, 3 Mar 2025 22:29:54 +0000 (23:29 +0100)
committerTianling Shen <[email protected]>
Sun, 6 Apr 2025 00:45:35 +0000 (08:45 +0800)
Signed-off-by: Moritz Warning <[email protected]>
net/zerotier/Makefile
net/zerotier/patches/0006-add-support-for-miniupnpc-2.2.8.patch [new file with mode: 0644]

index bce1255421d79f696e5bb4ff75d689b466b30ffd..bc19eaa7c2461df596671ec43002968face58a91 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zerotier
 PKG_VERSION:=1.14.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/zerotier/ZeroTierOne/tar.gz/$(PKG_VERSION)?
diff --git a/net/zerotier/patches/0006-add-support-for-miniupnpc-2.2.8.patch b/net/zerotier/patches/0006-add-support-for-miniupnpc-2.2.8.patch
new file mode 100644 (file)
index 0000000..00acd8c
--- /dev/null
@@ -0,0 +1,25 @@
+From a8cb9d188fabe750821661b5e34e9be467846283 Mon Sep 17 00:00:00 2001
+From: Moritz Warning <[email protected]>
+Date: Mon, 3 Mar 2025 23:26:42 +0100
+Subject: [PATCH] add support for miniupnpc 2.2.8
+
+Signed-off-by: Moritz Warning <[email protected]>
+---
+ osdep/PortMapper.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/osdep/PortMapper.cpp
++++ b/osdep/PortMapper.cpp
+@@ -230,7 +230,12 @@ public:
+                                       OSUtils::ztsnprintf(inport,sizeof(inport),"%d",localPort);
+                                       int foundValidIGD = 0;
++#if MINIUPNPC_API_VERSION < 18
+                                       if ((foundValidIGD = UPNP_GetValidIGD(devlist,&urls,&data,lanaddr,sizeof(lanaddr)))&&(lanaddr[0])) {
++#else
++                                      if ((foundValidIGD = UPNP_GetValidIGD(devlist,&urls,&data,lanaddr,sizeof(lanaddr),NULL,0))&&(lanaddr[0])) {
++#endif
++
+ #ifdef ZT_PORTMAPPER_TRACE
+                         PM_TRACE("PortMapper: UPnP: my LAN IP address: %s" ZT_EOL_S,lanaddr);
+ #endif