diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2024-06-13 13:25:37 +0000 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2024-06-21 15:42:38 +0100 |
commit | 391ce775f4661d2b9faa616b5d3d0511b53b79b2 (patch) | |
tree | 87407137d1463006bea551523a6e17ccf85815a9 /src | |
parent | d10cf127e576a8066a417aa77d49a6c726cb16af (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
Diffstat (limited to 'src')
-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) { |