Commit c83318bf authored by Steven Allen's avatar Steven Allen
Browse files

Revert "Merge pull request #386 from libp2p/fix/correct-external-addr"

This reverts commit aca83b9b, reversing
changes made to 86b8929d.

This was is not the correct fix. We already expose these addresses via the
host's AllAddrs method. The real problem is probably that we just don't ever
tell anyone about them (unless we disconnect and reconnect to our nearby DHT
nodes).

We need an address gossip protocol.
parent 163d7d40
......@@ -8,7 +8,6 @@ import (
lgbl "github.com/libp2p/go-libp2p-loggables"
inat "github.com/libp2p/go-libp2p-nat"
inet "github.com/libp2p/go-libp2p-net"
pstore "github.com/libp2p/go-libp2p-peerstore"
ma "github.com/multiformats/go-multiaddr"
)
......@@ -188,9 +187,6 @@ func addPortMapping(nmgr *natManager, intaddr ma.Multiaddr) {
return
}
// TODO: make these temporary and rediscover them.
nmgr.net.Peerstore().AddAddr(nmgr.net.LocalPeer(), extaddr, pstore.PermanentAddrTTL)
lm["outcome"] = "success"
lm["externalAddr"] = func() interface{} { return extaddr.String() }
log.Infof("established nat port mapping: %s <--> %s", intaddr, extaddr)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment