Skip to content
Snippets Groups Projects
Commit 269fc57f authored by Baptiste Jonglez's avatar Baptiste Jonglez
Browse files

dhtscanner: Report both IPv4 and IPv6 for the same ID (dual-stacked peers)

parent 54143d58
Branches
Tags
No related merge requests found
......@@ -30,7 +30,8 @@ using namespace dht;
struct snode_compare {
bool operator() (const std::shared_ptr<Node>& lhs, const std::shared_ptr<Node>& rhs) const{
return lhs->id < rhs->id;
return (lhs->id < rhs->id) ||
(lhs->id == rhs->id && lhs->getFamily() == AF_INET && rhs->getFamily() == AF_INET6);
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment