From f879cfc680521de81fef0bfc4a11e96623711712 Mon Sep 17 00:00:00 2001 From: Jacob Heun Date: Fri, 26 Apr 2019 15:00:17 +0200 Subject: [PATCH] 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. --- src/connection/manager.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/connection/manager.js b/src/connection/manager.js index b6abd362e3..38bb4e5bed 100644 --- a/src/connection/manager.js +++ b/src/connection/manager.js @@ -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)