From 03f779fd479f3a7bf74485cc0ca9e0a69ab8bb8c Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Tue, 28 Mar 2023 14:48:26 +0200 Subject: [PATCH] Test that an intermediate EDE does not get reported with the final answer --- .../test_AggressiveNSECCache.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) 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() -- 2.47.2