go-libp2p icon indicating copy to clipboard operation
go-libp2p copied to clipboard

Upnp port is not re-announced

Open master255 opened this issue 2 years ago • 5 comments

@marten-seemann There is a serious problem with upnp port announcement.

Turn on the application (Libp2p application where there is upnp announcement). Upnp port is announced on the router. It is announced every minute. Then turn off the internet connection in the router settings or pull the wire out of the router (emulate a real internet disconnection). Then turn on the Internet. Check upnp ports. There are none. And, even after 5 minutes they do not appear. This presents a serious problem. Because the stability of the internet connection is very bad all over the world (I checked).

master255 avatar Aug 18 '23 19:08 master255

@master255 Thanks for raising the issue but please do not tag Marten or individual maintainers directly. Tagging individual maintainers is not necessary since everyone subscribed to the repo already get notifications for GitHub issues. I've labeled this as needs/triage and someone on the team will investigate it (and we will discuss this in the next libp2p maintainers call) Thanks

p-shahi avatar Aug 18 '23 20:08 p-shahi

Ok

master255 avatar Aug 18 '23 20:08 master255

As I understand the result of our discussion - we need to fix it.

master255 avatar Aug 24 '23 19:08 master255

Discussed in the triage meeting. This will require debugging the UPnP code. It seems reasonable to periodically renew the UPnP mapping. Not sure if it's possible to trigger the renewal faster to be able to recover from this situation faster after a disconnect.

Fixing this issue won't be a priority for the libp2p stewards, but we'd be happy to review a PR.

marten-seemann avatar Aug 25 '23 03:08 marten-seemann

I was able to fix it easily. Maybe it is necessary to do something else? https://github.com/libp2p/go-libp2p/pull/2583

master255 avatar Sep 24 '23 21:09 master255