mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-08 03:59:18 +02:00
upnp: add compatibility for miniupnpc 2.2.8
See: c0a50ce33e
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
This commit is contained in:
parent
d10cf127e5
commit
391ce775f4
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user