Commit 6f30a449 authored by Ivan Vilata-i-Balaguer's avatar Ivan Vilata-i-Balaguer
Browse files

Fix byte ordering of IPv4 address gotten from DNS parser.

Boost needs a long in host order.
parent d9241cd4
......@@ -140,7 +140,7 @@ public:
void onDnsRec(in_addr addr, std::string name, std::string) override
{
if (name != _host) return; // unrelated answer, ignore
_epv.push_back({asio::ip::make_address_v4(addr.s_addr), _port});
_epv.push_back({asio::ip::make_address_v4(::ntohl(addr.s_addr)), _port});
}
void onDnsRec(in6_addr addr, std::string name, std::string) override
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment