peer: take into account omitted zeros for ipv6 addresses.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
This commit is contained in:
parent
e9ec9a5f0c
commit
aa383b984e
@ -384,7 +384,7 @@ Peer.prototype._handleGetAddr = function handleGetAddr() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
peer.ipv6 = peer.ipv6.split(':').slice(5).map(function(n) {
|
peer.ipv6 = peer.ipv6.split(':').slice(5).map(function(n) {
|
||||||
return parseInt(n, 16);
|
return parseInt(n || 0, 16);
|
||||||
});
|
});
|
||||||
|
|
||||||
peer.ipv4 = utils.readU32BE(peer.ipv4, 0);
|
peer.ipv4 = utils.readU32BE(peer.ipv4, 0);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user