You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the user has selected libp2p.NATPortMap option, we attempt to do NAT port mapping using upnp and other protocols.
If we fail to detect the NAT or fail to do the port mapping our address inference logic via observed address field in identify completely fails.
What happens is that the check for natmgr here https://github.com/libp2p/go-libp2p/blob/master/p2p/host/basic/basic_host.go#L847 will be non nil and all calls to GetMapping will return nil.
To reproduce, run this in an ec2 instance with NatPortMap flag selected, or run this with a router where we are unable to do nat mapping.
If the user has selected
libp2p.NATPortMap
option, we attempt to do NAT port mapping using upnp and other protocols.If we fail to detect the NAT or fail to do the port mapping our address inference logic via observed address field in identify completely fails.
What happens is that the check for natmgr here https://github.com/libp2p/go-libp2p/blob/master/p2p/host/basic/basic_host.go#L847 will be non nil and all calls to GetMapping will return nil.
To reproduce, run this in an ec2 instance with NatPortMap flag selected, or run this with a router where we are unable to do nat mapping.
This is a regression from v0.27. v0.27 did the right thing because it had this check https://github.com/libp2p/go-libp2p/blob/v0.27.0/p2p/host/basic/basic_host.go#L856
The text was updated successfully, but these errors were encountered: