Subject: | Net::DNS::Nameserver does not allow EDNS replies |
Date: | Thu, 23 Jun 2016 19:59:08 +0200 |
To: | bug-Net-DNS [...] rt.cpan.org |
From: | Bjørn Mork <bjorn [...] mork.no> |
Hello,
I have implemented a small server with DNSSEC support, but have been
unable to figure out any way to make it return the required OPT record.
The problem is that Net::DNS::Nameserver::make_reply() unconditionally
calls
my $reply = $query->reply();
without any possibility to set the optional $UDPmax argument to ->reply().
So ->reply() calls ->edns->size($UDPmax) with $UDPmax undefined:
$reply->edns->size($UDPmax) if $query->edns->_specified;
and the result is no Net::DNS::RR::OPT. I propose either just set a
default bufsize and unconditionally enabled EDNS0 support. There is
really no place for a server without it anymore... Or make it optional,
like the proposed patch does.
But even with the EDNS0 OPT in place, there is still no way to set the
"DO" flag on replies. I propose adding that to the existing headermask
and leave it to the ReplyHandler implementation to set it as
appropriate. This is also done in the attached patch.
Thanks for your excellent DNS implementation. This is extremely useful
for implementing special purpose DNS services.
Bjørn
Message body is not shown because sender requested not to inline it.