From 487a76b7bf9761877fefde1ffce63a8f6b778003 Mon Sep 17 00:00:00 2001 From: Fred Morcos Date: Tue, 31 May 2022 13:33:51 +0200 Subject: [PATCH] Implement operator== for SyncRes::AuthDomain --- pdns/syncres.cc | 8 ++++++++ pdns/syncres.hh | 2 ++ 2 files changed, 10 insertions(+) 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 { -- 2.47.2