mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 19:14:30 +04:00
Authored-by: Óscar García Amor <ogarcia@connectical.com> Signed-off-by: Moritz Warning <moritzwarning@web.de>
26 lines
875 B
Diff
26 lines
875 B
Diff
From 102ea404b6ee0099c43e8058366b19ce92c4e4c7 Mon Sep 17 00:00:00 2001
|
|
From: Moritz Warning <moritzwarning@web.de>
|
|
Date: Thu, 18 Sep 2025 23:21:53 +0200
|
|
Subject: [PATCH 6/6] add support for miniupnpc 2.2.8
|
|
|
|
---
|
|
osdep/PortMapper.cpp | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
--- a/osdep/PortMapper.cpp
|
|
+++ b/osdep/PortMapper.cpp
|
|
@@ -222,7 +222,13 @@ class PortMapperImpl {
|
|
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
|