Skip to content

Commit

Permalink
fix: dont blindly add observed addresses to our list (libp2p#337)
Browse files Browse the repository at this point in the history
Until we can properly validate the observed address our
peer tells us about, we shouldnt blindly add it to our
address list. Until we have better NAT management we cant
reliably validate that we're adding an appropriate address
for ourselves.
  • Loading branch information
jacobheun authored Apr 26, 2019
1 parent 3ca691f commit f879cfc
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/connection/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,7 @@ class ConnectionManager {
})
}

const { peerInfo, observedAddrs } = results

for (var i = 0; i < observedAddrs.length; i++) {
var addr = observedAddrs[i]
this.switch._peerInfo.multiaddrs.addSafe(addr)
}
const { peerInfo } = results

if (peerInfo) {
conn.setPeerInfo(peerInfo)
Expand Down

0 comments on commit f879cfc

Please sign in to comment.