From 336a601b2bd2d6475eca39a6ad1489a02354cdca Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 18 Jul 2025 17:05:37 +0200 Subject: [PATCH] dnsparser: Add a comment explaining that the OPT RR has to be in additional Signed-off-by: Remi Gacogne --- pdns/dnsparser.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/pdns/dnsparser.cc b/pdns/dnsparser.cc index 93ff63dd1..8d9e2968d 100644 --- a/pdns/dnsparser.cc +++ b/pdns/dnsparser.cc @@ -1162,6 +1162,7 @@ bool getEDNSUDPPayloadSizeAndZ(const char* packet, size_t length, uint16_t* payl { const dnsheader_aligned dh(packet); if (dh->arcount == 0) { + // The OPT pseudo-RR, if present, has to be in the additional section (https://datatracker.ietf.org/doc/html/rfc6891#section-6.1.1) return false; } -- 2.47.2