diff options
author | fanquake <fanquake@gmail.com> | 2021-07-29 15:57:45 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-02-01 15:57:26 +0000 |
commit | b3b673f7048cce1d1368819abb0b58b7c6699fa5 (patch) | |
tree | 1b606606736f6c9bfa3cb673abdee0db34fd10e9 /src/mapport.cpp | |
parent | 2d5acc901db336868dee158022a115b120b5b675 (diff) | |
download | bitcoin-b3b673f7048cce1d1368819abb0b58b7c6699fa5.tar.xz |
mapport: require miniupnpc API version 17 or later
Version 17 is currently the latest version, and has been available since
the release of 2.1.
See: https://github.com/miniupnp/miniupnp/blob/master/miniupnpc/apiversions.txt.
Diffstat (limited to 'src/mapport.cpp')
-rw-r--r-- | src/mapport.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/mapport.cpp b/src/mapport.cpp index e6a473c185..84b889f22d 100644 --- a/src/mapport.cpp +++ b/src/mapport.cpp @@ -27,9 +27,9 @@ #include <miniupnpc/miniupnpc.h> #include <miniupnpc/upnpcommands.h> #include <miniupnpc/upnperrors.h> -// The minimum supported miniUPnPc API version is set to 10. This keeps compatibility -// with Ubuntu 16.04 LTS and Debian 8 libminiupnpc-dev packages. -static_assert(MINIUPNPC_API_VERSION >= 10, "miniUPnPc API version >= 10 assumed"); +// The minimum supported miniUPnPc API version is set to 17. This excludes +// versions with known vulnerabilities. +static_assert(MINIUPNPC_API_VERSION >= 17, "miniUPnPc API version >= 17 assumed"); #endif // USE_UPNP #include <atomic> @@ -159,11 +159,7 @@ static bool ProcessUpnp() char lanaddr[64]; int error = 0; -#if MINIUPNPC_API_VERSION < 14 - devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error); -#else devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 2, &error); -#endif struct UPNPUrls urls; struct IGDdatas data; |