miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

NAT traversal not working on wake from sleep

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Bugs
View previous topic :: View next topic  
Author Message
phreakymonkey



Joined: 16 Feb 2014
Posts: 1

PostPosted: Sun Feb 16, 2014 5:57 am    Post subject: NAT traversal not working on wake from sleep Reply with quote

Posted this bug on Transmission's bug tracker and they referred me here...

Quote:
I've noticed that after waking from sleep after a certain time, the UPnP lease on my router seems to time out and the port check tool reports it as closed. Even after randomizing the port, it still reports back as closed. The only way to get the application to map the port properly is to uncheck and then recheck the "Automatically Map Port" checkbox or restart the application.


Is this miniupnp's fault or Transmission's fault, I wonder?
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Mon Feb 17, 2014 3:27 pm    Post subject: Reply with quote

I suppose that the router remove the port mapping after a certain time.
Well it can happen, it is router's fault.

But apparently, Transmission doesn't react well to that, it looks like it still think the mapping is there, so it doesn't work.
Transmission should use miniupnpc API to check the mapping, and add it again if needed.

IF port appears to be "closed" :
call UPNP_GetSpecificPortMappingEntry()
IF return code is 704 "NoSuchEntry"
THEN call UPNP_AddPortMapping() again

if the mapping is with another internalclient/port, well the mapping was "stolen", the safe thing to do would be to change port (external port)
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.