]> granicus.if.org Git - pdns/commitdiff
rec: Fix nits (trailing whitespaces, useless return statement)
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 31 Dec 2018 08:46:27 +0000 (09:46 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 21 Jan 2019 15:38:59 +0000 (16:38 +0100)
pdns/recursordist/test-syncres_cc.cc
pdns/syncres.cc

index 929dea179ad54324a8a713c4372662eabcc34293..9ea96254d598e45c336072f8e8a45656890d50e3 100644 (file)
@@ -10477,8 +10477,6 @@ BOOST_AUTO_TEST_CASE(test_records_sanitization_general) {
       /* should be scrubbed because it doesn't match any of the accepted names in this answer (mostly 'domain') */
       addRecordToLW(res, DNSName("powerdns.com."), QType::AAAA, "2001:db8::1", DNSResourceRecord::ADDITIONAL);
       return 1;
-
-      return 0;
     });
 
   const time_t now = sr->getNow().tv_sec;
@@ -10514,8 +10512,6 @@ BOOST_AUTO_TEST_CASE(test_records_sanitization_keep_relevant_additional_aaaa) {
       addRecordToLW(res, domain, QType::A, "192.0.2.1");
       addRecordToLW(res, domain, QType::AAAA, "2001:db8::1", DNSResourceRecord::ADDITIONAL);
       return 1;
-
-      return 0;
     });
 
   const time_t now = sr->getNow().tv_sec;
index 9f486ac80cd6f889bfeeda3f400297e6959e4dff..f88fe6562cb82515eec7ac6273b0e7d2fc536f26 100644 (file)
@@ -2087,11 +2087,11 @@ void SyncRes::sanitizeRecords(const std::string& prefix, LWResult& lwr, const DN
     if (rec->d_place == DNSResourceRecord::AUTHORITY && rec->d_type == QType::NS && (isNXDomain || isNXQType)) {
       /* we don't want to pick up NS records in AUTHORITY or ADDITIONAL sections of NXDomain answers
          because they are somewhat easy to insert into a large, fragmented UDP response
-         for an off-path attacker by injecting spoofed UDP fragments. 
+         for an off-path attacker by injecting spoofed UDP fragments.
       */
       LOG(prefix<<"Removing NS record '"<<rec->d_name<<"|"<<DNSRecordContent::NumberToType(rec->d_type)<<"|"<<rec->d_content->getZoneRepresentation()<<"' in the "<<(int)rec->d_place<<" section of a "<<(isNXDomain ? "NXD" : "NXQTYPE")<<" response received from "<<auth<<endl);
       rec = lwr.d_records.erase(rec);
-      continue;      
+      continue;
     }
 
     if (rec->d_place == DNSResourceRecord::AUTHORITY && rec->d_type == QType::NS) {