Skip Menu |

This queue is for tickets about the Net-DNS CPAN distribution.

Report information
The Basics
Id: 132921
Status: resolved
Priority: 0/
Queue: Net-DNS

People
Owner: Nobody in particular
Requestors: ray [...] isc.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.25_01



Subject: EDNS OPT handling
Date: Wed, 1 Jul 2020 13:59:53 +0100
To: bug-Net-DNS [...] rt.cpan.org
From: Ray Bellis <ray [...] isc.org>
With latest (1.25) explicitly setting the `edns->version()` on a packet is unsufficient to trigger adding an OPT RR. To resolve this, the "version" property should be added to the list of fields checked in the `_specified` method of Net::DNS::RR:OPT. A further confusion arises from the use of `packet->edns->size()` which is ignored when you pass a packet to Net::DNS::Resolver.send() and is promptly overwritten by the Resolver object's own `udppacketsize` property. I'm unsure of the right fix, but I'd suggest that if the packet's EDNS size has been explicitly specified that it shouldn't then get overwritten internally within Net::DNS. If I pass a packet to `send()` I'd rather hope that that's the packet that actually gets sent! :) cheers, Ray
On Wed Jul 01 09:19:55 2020, ray@isc.org wrote: Show quoted text
> With latest (1.25) explicitly setting the `edns->version()` on a packet > is unsufficient to trigger adding an OPT RR.
This is not peculiar to 1.25. OPT has never been added into a query by setting $packet->edns->version(1) alone. Prior to 1.21, it was not possible to specify the version at all. Show quoted text
> To resolve this, the "version" property should be added to the list of > fields checked in the `_specified` method of Net::DNS::RR:OPT.
The version in an EDNS OPT RR advertises the capabilities of the implementation that created it. With that world view, setting edns->version makes little sense in general. Neither is this essential for creating a test query to elicit a BADVERS error response from a nameserver. my $query = new Net::DNS::Packet( "example.com.", "SOA" ); $query->edns->version(1); $query->edns->option(65500 => 1); # ignored per RFC6891 6.1.2 Show quoted text
> A further confusion arises from the use of `packet->edns->size()` which > is ignored when you pass a packet to Net::DNS::Resolver.send() and is > promptly overwritten by the Resolver object's `udppacketsize` property.
The present code regards EDNS packet size as a resolver configuration attribute and fails to recognise that this might be specified in a query. Show quoted text
> If I pass a packet to `send()` I'd rather hope that that's the packet > that actually gets sent! :)
Agree
Resolved in Net::DNS 1.26