From 1bb97c025c848c3d14ba6d92b41d3c6ff38209d5 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 31 Dec 2018 09:46:27 +0100 Subject: [PATCH] rec: Fix nits (trailing whitespaces, useless return statement) --- pdns/recursordist/test-syncres_cc.cc | 4 ---- pdns/syncres.cc | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pdns/recursordist/test-syncres_cc.cc b/pdns/recursordist/test-syncres_cc.cc index 929dea179..9ea96254d 100644 --- a/pdns/recursordist/test-syncres_cc.cc +++ b/pdns/recursordist/test-syncres_cc.cc @@ -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; diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 9f486ac80..f88fe6562 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -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 '"<d_name<<"|"<d_type)<<"|"<d_content->getZoneRepresentation()<<"' in the "<<(int)rec->d_place<<" section of a "<<(isNXDomain ? "NXD" : "NXQTYPE")<<" response received from "<d_place == DNSResourceRecord::AUTHORITY && rec->d_type == QType::NS) { -- 2.50.1