Skip to content

Commit 448e9e2

Browse files
committed
Prevent adding bootstrap servers to knownnodes when received in addr
1 parent 3108115 commit 448e9e2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/network/bmproto.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,14 @@ def bm_command_addr(self):
437437
# pylint: disable=redefined-outer-name
438438
addresses = self._decode_addr()
439439
for seenTime, stream, _, ip, port in addresses:
440-
decodedIP = protocol.checkIPAddress(str(ip))
441-
if stream not in state.streamsInWhichIAmParticipating:
440+
ip = str(ip)
441+
if (
442+
stream not in state.streamsInWhichIAmParticipating
443+
# FIXME: should check against complete list
444+
or ip.startswith('bootstrap')
445+
):
442446
continue
447+
decodedIP = protocol.checkIPAddress(ip)
443448
if (
444449
decodedIP
445450
and time.time() - seenTime > 0

0 commit comments

Comments
 (0)