]> granicus.if.org Git - pdns/commitdiff
DNSRecords disregarded d_ttl in < comparison. Unsure if this will break things!
authorbert hubert <bert.hubert@netherlabs.nl>
Fri, 29 Jan 2016 10:40:33 +0000 (11:40 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Fri, 29 Jan 2016 10:40:33 +0000 (11:40 +0100)
pdns/dnsparser.hh

index 17d2a57fa889185722bcf72231c1f97021e47bfe..c347293f7c01d5d76e0c9760b8f523f5f16684ca 100644 (file)
@@ -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;