Opened 7 years ago

Last modified 6 years ago

#5513 new Bug

NAT traversal not working on wake from sleep

Reported by: phreakymonkey Owned by:
Priority: Normal Milestone: None Set
Component: Transmission Version: 2.82
Severity: Normal Keywords:
Cc:

Description

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.

Change History (3)

comment:1 Changed 7 years ago by livings124

We use miniupnp/libnat for mapping ports. You should be able to ask at http://miniupnp.tuxfamily.org

comment:2 Changed 7 years ago by BeTeP_B_HocY

Dear developer!

Please see this comment from miniupnp. http://miniupnp.tuxfamily.org/forum/viewtopic.php?t=1668 miniupnp Site Admin

Joined: 14 Apr 2007 Posts: 1094

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. http://miniupnp.tuxfamily.org/

comment:3 Changed 6 years ago by gdamjan

This can also happen when the router (or the upnp service) is restarted.

Transmission should periodically check the uPNP mapping and reinstate it.

Note: See TracTickets for help on using tickets.