Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: chaz [...] chaz6.com
Cc:
AdminCc:

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



Subject: Support for edns-client-subnet (EDNS OPT 8)
This bug supersedes bug #75357. IANA has now allocated EDNS OPT code 8 for edns-client-subnet [1]. It would be useful to be able to use this option in Net::DNS. [1] http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-11
From: rwfranks [...] acm.org
On Fri Oct 03 06:23:53 2014, chaz6 wrote: Show quoted text
> This bug supersedes bug #75357. IANA has now allocated EDNS OPT code 8 > for edns-client-subnet [1]. It would be useful to be able to use this > option in Net::DNS. >
use Net::DNS 0.79; my $query = new Net::DNS::Packet('example.com'); $query->edns->option( 'CLIENT-SUBNET' => pack 'C3 H*', 1, 0, 0, '00000000' ); $query->edns->print; $resolver->send($query); __END__ ;; EDNS version 0 ;; flags: 0000 ;; rcode: NOERROR ;; size: 512 ;; option: CLIENT-SUBNET 01000000000000
From: rwfranks [...] acm.org
Correction: The family field should be 16 bits. $query->edns->option( 'CLIENT-SUBNET' => pack 'N C2 H*', 1, 0, 0, '00000000' ); which makes the corresponding output: ;; EDNS version 0 ;; flags: 0000 ;; rcode: NOERROR ;; size: 512 ;; option: CLIENT-SUBNET 0001000000000000
The opcode is available and can be used in recent version of Net::DNS.