From: bert hubert Date: Fri, 29 Jan 2016 10:40:33 +0000 (+0100) Subject: DNSRecords disregarded d_ttl in < comparison. Unsure if this will break things! X-Git-Tag: dnsdist-1.0.0-alpha2~24^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2dcd140add9e9255359123485e88fdc53116881e;p=thirdparty%2Fpdns.git DNSRecords disregarded d_ttl in < comparison. Unsure if this will break things! --- diff --git a/pdns/dnsparser.hh b/pdns/dnsparser.hh index 17d2a57fa8..c347293f7c 100644 --- a/pdns/dnsparser.hh +++ b/pdns/dnsparser.hh @@ -266,10 +266,10 @@ struct DNSRecord bool operator<(const DNSRecord& rhs) const { - if(tie(d_name, d_type, d_class) < tie(rhs.d_name, rhs.d_type, rhs.d_class)) + if(tie(d_name, d_type, d_class, d_ttl) < tie(rhs.d_name, rhs.d_type, rhs.d_class, rhs.d_ttl)) return true; - if(tie(d_name, d_type, d_class) != tie(rhs.d_name, rhs.d_type, rhs.d_class)) + if(tie(d_name, d_type, d_class, d_ttl) != tie(rhs.d_name, rhs.d_type, rhs.d_class, rhs.d_ttl)) return false; string lzrp, rzrp;