mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 20:13:44 +02:00
Add support for support miniupnpc 2.2.8
Some packages like for OpenWrt use the native miniupnpc library that is not API compatible with the one included in ZeroTier.
This commit is contained in:
parent
dcadc2c4d4
commit
1ca9bdfcfa
1 changed files with 5 additions and 0 deletions
|
@ -230,7 +230,12 @@ public:
|
|||
OSUtils::ztsnprintf(inport,sizeof(inport),"%d",localPort);
|
||||
|
||||
int foundValidIGD = 0;
|
||||
#if MINIUPNPC_API_VERSION < 18
|
||||
if ((foundValidIGD = UPNP_GetValidIGD(devlist,&urls,&data,lanaddr,sizeof(lanaddr)))&&(lanaddr[0])) {
|
||||
#else
|
||||
if ((foundValidIGD = UPNP_GetValidIGD(devlist,&urls,&data,lanaddr,sizeof(lanaddr),NULL,0))&&(lanaddr[0])) {
|
||||
#endif
|
||||
|
||||
#ifdef ZT_PORTMAPPER_TRACE
|
||||
PM_TRACE("PortMapper: UPnP: my LAN IP address: %s" ZT_EOL_S,lanaddr);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue