]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Implement operator== for SyncRes::AuthDomain
authorFred Morcos <fred.morcos@open-xchange.com>
Tue, 31 May 2022 11:33:51 +0000 (13:33 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Mon, 13 Jun 2022 12:24:23 +0000 (14:24 +0200)
pdns/syncres.cc
pdns/syncres.hh

index cc6b9b42667c9f2521885a1ffcf7864aa35a4307..3e04d88d7dde30b0be2e0b01862002155deb5976 100644 (file)
@@ -860,6 +860,14 @@ void SyncRes::AuthDomain::addSOA(std::vector<DNSRecord>& records) const
   }
 }
 
+bool SyncRes::AuthDomain::operator==(const AuthDomain& rhs) const
+{
+  return d_records == rhs.d_records
+    && d_servers == rhs.d_servers
+    && d_name == rhs.d_name
+    && d_rdForward == rhs.d_rdForward;
+}
+
 int SyncRes::AuthDomain::getRecords(const DNSName& qname, const QType qtype, std::vector<DNSRecord>& records) const
 {
   int result = RCode::NoError;
index e817d9d3f711bd644ebea49d823ed5a4a527ec9a..d8dbe22a82e08883392fa1d0c64fa174e95816d9 100644 (file)
@@ -114,6 +114,8 @@ public:
     DNSName d_name;
     bool d_rdForward{false};
 
+    bool operator==(const AuthDomain& rhs) const;
+
     int getRecords(const DNSName& qname, QType qtype, std::vector<DNSRecord>& records) const;
     bool isAuth() const
     {