From: Otto Moerbeek Date: Tue, 28 Mar 2023 12:48:26 +0000 (+0200) Subject: Test that an intermediate EDE does not get reported with the final answer X-Git-Tag: rec-4.9.0-alpha1~25^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F12694%2Fhead;p=thirdparty%2Fpdns.git Test that an intermediate EDE does not get reported with the final answer --- diff --git a/regression-tests.recursor-dnssec/test_AggressiveNSECCache.py b/regression-tests.recursor-dnssec/test_AggressiveNSECCache.py index 305ee05ca9..35588e33c6 100644 --- a/regression-tests.recursor-dnssec/test_AggressiveNSECCache.py +++ b/regression-tests.recursor-dnssec/test_AggressiveNSECCache.py @@ -46,6 +46,27 @@ class AggressiveNSECCacheBase(RecursorTest): self.assertTrue(False) + def testNoEDE(self): + # This isn't an aggresive cache check, but the strcuture is very similar to the others, + # so letys place it here. + # It test the issue that an intermediate EDE does not get reported with the final answer + # https://github.com/PowerDNS/pdns/pull/12694 + self.wipe() + + res = self.sendQuery('host1.sub.secure.example.', 'TXT') + self.assertRcodeEqual(res, dns.rcode.NOERROR) + self.assertAnswerEmpty(res) + self.assertAuthorityHasSOA(res) + self.assertMessageIsAuthenticated(res) + self.assertEqual(res.edns, 0) + self.assertEqual(len(res.options), 0) + + res = self.sendQuery('host1.sub.secure.example.', 'A') + self.assertRcodeEqual(res, dns.rcode.NOERROR) + self.assertMessageIsAuthenticated(res) + self.assertEqual(res.edns, 0) + self.assertEqual(len(res.options), 0) + def testNoData(self): self.wipe()