From cbc069badae76e616aa8fd8d8b733cfe2a4e6c4c Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Mon, 26 Apr 2010 19:08:39 -0500 Subject: Define comparator for irc::sockets::sockaddrs This only compares IP/port, which ignores IPv6 flow information and scope ID, which aren't important in testing for equality. --- src/dns.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dns.cpp') diff --git a/src/dns.cpp b/src/dns.cpp index ef9ac12bf..945e1fb15 100644 --- a/src/dns.cpp +++ b/src/dns.cpp @@ -578,7 +578,7 @@ DNSResult DNS::GetResult() * * -- Thanks jilles for pointing this one out. */ - if (memcmp(&from, &myserver, sizeof(irc::sockets::sockaddrs))) + if (from != myserver) { ServerInstance->Logs->Log("RESOLVER",DEBUG,"Got a result from the wrong server! Bad NAT or DNS forging attempt? '%s' != '%s'", from.str().c_str(), myserver.str().c_str()); -- cgit v1.3.1-10-gc9f91