Skip to content

Commit

Permalink
miniUPnPc API v15+ Compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostlander committed Apr 22, 2016
1 parent 0d990c7 commit cb73db5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1065,12 +1065,17 @@ void ThreadMapPort2(void* parg)
char lanaddr[64];

#ifndef UPNPDISCOVER_SUCCESS
/* miniupnpc 1.5 */
/* miniUPnPc v1.5 */
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0);
#else
/* miniupnpc 1.6 */
#elif (MINIUPNPC_API_VERSION < 14)
/* miniUPnPc v1.6 to v1.9 */
int error = 0;
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);
#else
/* miniUPnPc v1.9.20150730 and newer;
* CVE-2015-6031 may affect releases prior to v1.9.20150917 */
int error = 0;
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 2, &error);
#endif

struct UPNPUrls urls;
Expand Down

0 comments on commit cb73db5

Please sign in to comment.