Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: ABH [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: edns-subnet-address support
It'd be nice to have support for edns-subnet-address; specifically in Net::DNS::Nameserver.
From: steven.hartland [...] multiplay.co.uk
On Mon Feb 27 18:49:01 2012, ABH wrote: Show quoted text
> It'd be nice to have support for edns-subnet-address; specifically in > Net::DNS::Nameserver.
I've just created a patch which does just this, feel free to try and report any issues. http://blog.multiplay.co.uk/2012/10/edns-client-subnet-support-patches/ If all works well feel free to include this in a future version of Net::DNS
From: rwfranks [...] acm.org
On Tue Oct 16 12:02:29 2012, steveh wrote: Show quoted text
> On Mon Feb 27 18:49:01 2012, ABH wrote:
> > It'd be nice to have support for edns-subnet-address;
The EDNS OPT record is intended for protocol extensions defined in IETF standards documents. It is emphatically _NOT_ available for casual use by end-users. Permissible option codes are defined in the registry maintained by IANA. 20730 is not one of them. The present implementation does not understand the content of the options, neither does it need to do so. The next release will integrate OPT as a proper packet header extension. The idea of a subclass for each option is incompatible with both the intent and implementation of such integration. Dick Franks
Dick, I couldn't decipher from your message (other than that you seem to dislike the edns- subnet-address extension) if Net::DNS will support it in the future or not. FWIW I've re-implemented my Net::DNS::Nameserver based server in Go - http://news.ntppool.org/2012/10/new-dns-server.html The DNS library I use there supports edns-subnet-address with a few helper functions: https://github.com/miekg/dns
From: rwfranks [...] acm.org
On Sun Oct 21 16:57:52 2012, ABH wrote: Show quoted text
> Dick, I couldn't decipher from your message (other than that you seem > to dislike the edns- > subnet-address extension) if Net::DNS will support it in the future or > not. > > FWIW I've re-implemented my Net::DNS::Nameserver based server in Go - > http://news.ntppool.org/2012/10/new-dns-server.html > > The DNS library I use there supports edns-subnet-address with a few > helper functions: > https://github.com/miekg/dns
I suggest you read RFC2671 which defines EDNS, especially sections 4 and 7. Adding options requires IETF standards action. OPT.pm follows that action. There is no IETF document specifying an edns-subnet-address option. Net::DNS will not support it unless there is.
RT-Send-CC: rwfranks [...] acm.org, rwfranks [...] acm.org
Hi, I noticed there is now a IETF standard for this edns option: https://datatracker.ietf.org/doc/rfc7871/ Could we reopen this ticket? I too would like Net::DNS::Resolver to have edns-subnet-address support.
On Mon Feb 13 11:11:02 2017, CURTIS wrote: Show quoted text
> Hi, > > I noticed there is now a IETF standard for this edns option: > https://datatracker.ietf.org/doc/rfc7871/ > > Could we reopen this ticket? I too would like Net::DNS::Resolver to
Sorry, just to correct myself: I meant to write Net::DNS::Nameserver (the same module ABH mentioned). Show quoted text
> have edns-subnet-address support.
From: rwfranks [...] acm.org
On Mon Feb 13 11:11:02 2017, CURTIS wrote: Show quoted text
> Hi, > > I noticed there is now a IETF standard for this edns option: > https://datatracker.ietf.org/doc/rfc7871/ > > Could we reopen this ticket? I too would like Net::DNS::Resolver to > have edns-subnet-address support.
RFC7871 is NOT a standard, its status is currently informational. If you are intending to use Net::DNS::Nameserver, then you will need to provide a suitable reply handler. The problem (RT#115558) which previously prevented the creation of EDNS replies was fixed in 1.07. Whatever you do, please use _only_ the advertised methods. Finding out what option numbers are present: my @options = $query->edns->options; The option value can be obtained from the query passed to your reply handler like this: my $value = $query->edns->option('CLIENT-SUBNET'); # also accepts number Net::DNS knows nothing about EDNS options other than the (name,value) pair. Decoding is expected to be done by the end user. Setting options in the reply is more of a challenge, because the reply handler has no means of accessing the reply packet. At the risk of making the interface to the reply handler even more inefficient and ugly than it already is, the simplest solution would be something similar to the headermask. my $optionmask = { 'CLIENT-SUBNET' => $content }; Please keep in mind that Net::DNS::Nameserver will never be anything more than an experimental plaything and the security of your machine will be at risk if exposed to the internet.
From: rwfranks [...] acm.org
If we are to remain reasonably backward compatible, probably the best that can be done is to provide some mechanism for constructing the option values. For example: $packet->edns->option( 'CLIENT-SUBNET' => { FAMILY => 1, ADDRESS => '123.123.123.123', 'SOURCE-PREFIX-LENGTH' => 15 } ); Access to the internal fields is provided by extracting the option data into a local hash: $VAR1 = { $packet->edns->option('CLIENT-SUBNET') }; which contains: $VAR1 = { 'ADDRESS' => '123.122.0.0', 'FAMILY' => 1, 'SCOPE-PREFIX-LENGTH' => 0, 'SOURCE-PREFIX-LENGTH' => 15 }; Different approaches may be needed for other options, some of which contain a list of values, and others which are intended to be opaque.
From: rwfranks [...] acm.org
Implemented in 1.08_02