Skip to content

Commit

Permalink
Merge #2939: [Net]: Add compatibility for miniupnpc 2.2.8
Browse files Browse the repository at this point in the history
4fffec0 upnp: add compatibility for miniupnpc 2.2.8 (Cory Fields)

Pull request description:

  See: miniupnp/miniupnp@c0a50ce

  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.

  ---

  Upstream: bitcoin#30283

ACKs for top commit: 4fffec0
  panleone:
    utACK 4fffec0
  Liquid369:
    tACK 4fffec0

Tree-SHA512: 01adcb1e92badefc5ba0e9ec539aafed6c8aef3133321a1da954dbf99f31964f0250bebf6e85831b6d051362ed4d17f65151144942eab86ea4c7f6ababca37bc
  • Loading branch information
Fuzzbawls committed Oct 17, 2024
2 parents b507683 + 4fffec0 commit 97a3237
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/mapport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,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) {
char externalIPAddress[40];
Expand Down

0 comments on commit 97a3237

Please sign in to comment.