Add a minimal sanity check for addresses in the received addr message
This commit is contained in:
parent
d02cde25a7
commit
df7f4bffdc
|
@ -425,6 +425,8 @@ class Connection(threading.Thread):
|
||||||
addr = message.Addr.from_message(m)
|
addr = message.Addr.from_message(m)
|
||||||
logging.debug('%s:%s -> %s', self.host_print, self.port, addr)
|
logging.debug('%s:%s -> %s', self.host_print, self.port, addr)
|
||||||
for a in addr.addresses:
|
for a in addr.addresses:
|
||||||
|
if not a.host or a.port == 0:
|
||||||
|
continue
|
||||||
shared.unchecked_node_pool.add((a.host, a.port))
|
shared.unchecked_node_pool.add((a.host, a.port))
|
||||||
|
|
||||||
elif m.command == b'ping':
|
elif m.command == b'ping':
|
||||||
|
|
Loading…
Reference in New Issue
Block a user