diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2024-06-13 13:25:37 +0000 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2024-06-19 12:49:04 +0100 |
commit | 6338f92260523eaf7cd9c89300f4f088f9319b0d (patch) | |
tree | ca58f7a7b27e7de2a4c2cecd5694bac4fd5c9e96 | |
parent | f34e44616d24ad19f87fced8216d5ff23e5a27c8 (diff) |
upnp: add compatibility for miniupnpc 2.2.8
See: https://github.com/miniupnp/miniupnp/commit/c0a50ce33e3b99ce8a96fd43049bb5b53ffac62f
The return value of 2 now indicates:
"A valid connected IGD has been found but its IP address is reserved (non routable)"
We continue to ignore any return value other than 1.
Github-Pull: #30283
Rebased-From: 8acdf66540834b9f9cf28f16d389e8b6a48516d5
-rw-r--r-- | src/mapport.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mapport.cpp b/src/mapport.cpp index 08b365db4b..f58d8ced15 100644 --- a/src/mapport.cpp +++ b/src/mapport.cpp @@ -163,8 +163,11 @@ static bool ProcessUpnp() struct UPNPUrls urls; struct IGDdatas data; int r; - +#if MINIUPNPC_API_VERSION <= 17 r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr)); +#else + r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr), nullptr, 0); +#endif if (r == 1) { if (fDiscover) { |