From: Remi Gacogne Date: Fri, 18 Jul 2025 15:05:37 +0000 (+0200) Subject: dnsparser: Add a comment explaining that the OPT RR has to be in additional X-Git-Tag: rec-5.4.0-alpha0~8^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F15869%2Fhead;p=thirdparty%2Fpdns.git dnsparser: Add a comment explaining that the OPT RR has to be in additional Signed-off-by: Remi Gacogne --- 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; }