From: Fred Morcos Date: Tue, 31 May 2022 11:33:51 +0000 (+0200) Subject: Implement operator== for SyncRes::AuthDomain X-Git-Tag: auth-4.8.0-alpha0~63^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=487a76b7bf9761877fefde1ffce63a8f6b778003;p=thirdparty%2Fpdns.git Implement operator== for SyncRes::AuthDomain --- diff --git a/pdns/syncres.cc b/pdns/syncres.cc index cc6b9b4266..3e04d88d7d 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -860,6 +860,14 @@ void SyncRes::AuthDomain::addSOA(std::vector& 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& records) const { int result = RCode::NoError; diff --git a/pdns/syncres.hh b/pdns/syncres.hh index e817d9d3f7..d8dbe22a82 100644 --- a/pdns/syncres.hh +++ b/pdns/syncres.hh @@ -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& records) const; bool isAuth() const {