]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
ixfrSuck: init soatimes without separate memset 14684/head
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Thu, 19 Sep 2024 06:06:52 +0000 (08:06 +0200)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Sun, 22 Sep 2024 11:51:12 +0000 (13:51 +0200)
pdns/auth-secondarycommunicator.cc

index ae9a54243712f824a5243af3850d331cce5a6eec..739838afe9762cce2d95f6842b8357f5a2e9a857 100644 (file)
@@ -448,12 +448,9 @@ void CommunicatorClass::ixfrSuck(const DNSName& domain, const TSIGTriplet& tt, c
     }
 
     uint16_t xfrTimeout = ::arg().asNum("axfr-fetch-timeout");
-    soatimes st;
-    memset(&st, 0, sizeof(st));
-    st.serial = di.serial;
-
+    soatimes drsoa_soatimes = {di.serial, 0, 0, 0, 0};
     DNSRecord drsoa;
-    drsoa.setContent(std::make_shared<SOARecordContent>(g_rootdnsname, g_rootdnsname, st));
+    drsoa.setContent(std::make_shared<SOARecordContent>(g_rootdnsname, g_rootdnsname, drsoa_soatimes));
     auto deltas = getIXFRDeltas(remote, domain, drsoa, xfrTimeout, false, tt, laddr.sin4.sin_family ? &laddr : nullptr, ((size_t)::arg().asNum("xfr-max-received-mbytes")) * 1024 * 1024);
     zs.numDeltas = deltas.size();
     //    cout<<"Got "<<deltas.size()<<" deltas from serial "<<di.serial<<", applying.."<<endl;