mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 20:43:44 +02:00
GitHub issue #242 -- crappy uPnP protocol demands infinite lease time or else
This commit is contained in:
parent
451b8aa7b2
commit
a13ba7102a
2 changed files with 1 additions and 6 deletions
|
@ -115,7 +115,7 @@ public:
|
||||||
Utils::snprintf(outport,sizeof(outport),"%u",tryPort);
|
Utils::snprintf(outport,sizeof(outport),"%u",tryPort);
|
||||||
|
|
||||||
int mapResult = 0;
|
int mapResult = 0;
|
||||||
if ((mapResult = UPNP_AddPortMapping(urls.controlURL,data.first.servicetype,outport,inport,lanaddr,"ZeroTier","UDP",(const char *)0,ZT_UPNP_LEASE_DURATION)) == UPNPCOMMAND_SUCCESS) {
|
if ((mapResult = UPNP_AddPortMapping(urls.controlURL,data.first.servicetype,outport,inport,lanaddr,"ZeroTier","UDP",(const char *)0,"0")) == UPNPCOMMAND_SUCCESS) {
|
||||||
#ifdef ZT_UPNP_TRACE
|
#ifdef ZT_UPNP_TRACE
|
||||||
fprintf(stderr,"UPNPClient: reserved external port: %s"ZT_EOL_S,outport);
|
fprintf(stderr,"UPNPClient: reserved external port: %s"ZT_EOL_S,outport);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -42,11 +42,6 @@
|
||||||
*/
|
*/
|
||||||
#define ZT_UPNP_CLIENT_REFRESH_DELAY 600000
|
#define ZT_UPNP_CLIENT_REFRESH_DELAY 600000
|
||||||
|
|
||||||
/**
|
|
||||||
* UPNP lease duration in seconds (as string)
|
|
||||||
*/
|
|
||||||
#define ZT_UPNP_LEASE_DURATION "3600"
|
|
||||||
|
|
||||||
namespace ZeroTier {
|
namespace ZeroTier {
|
||||||
|
|
||||||
class UPNPClientImpl;
|
class UPNPClientImpl;
|
||||||
|
|
Loading…
Add table
Reference in a new issue