Skip to content
This repository was archived by the owner on Aug 23, 2019. It is now read-only.

Commit f879cfc

Browse files
authored
fix: dont blindly add observed addresses to our list (#337)
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.
1 parent 3ca691f commit f879cfc

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/connection/manager.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,7 @@ class ConnectionManager {
179179
})
180180
}
181181

182-
const { peerInfo, observedAddrs } = results
183-
184-
for (var i = 0; i < observedAddrs.length; i++) {
185-
var addr = observedAddrs[i]
186-
this.switch._peerInfo.multiaddrs.addSafe(addr)
187-
}
182+
const { peerInfo } = results
188183

189184
if (peerInfo) {
190185
conn.setPeerInfo(peerInfo)

0 commit comments

Comments
 (0)