Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: Mark.Martinec [...] ijs.si
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.71
Fixed in: (no value)



Subject: RES_OPTIONS does not allow colons in an option value
Here is a trivial one: it is not possible to specify an IPv6 address for a srcaddr through RES_OPTIONS environment variable: RES_OPTIONS='srcaddr:2001:1470:ff80::53:64' ./your-program-here The value gets truncated after the first colon resulting in srcaddr=2001. The fix: --- lib/Net/DNS/Resolver/Base.pm~ +++ lib/Net/DNS/Resolver/Base.pm @@ -219,5 +219,5 @@ if (exists $ENV{'RES_OPTIONS'}) { foreach ($ENV{'RES_OPTIONS'} =~ m/(\S+)/g) { - my ($name, $val) = split(m/:/); + my ($name, $val) = split(m/:/,$_,2); $val = 1 unless defined $val; $config->{$name} = $val if exists $config->{$name};
Absolutely. Committed. On Thu Dec 27 14:57:02 2012, Mark.Martinec@ijs.si wrote: Show quoted text
> Here is a trivial one: it is not possible to specify an IPv6 address > for a srcaddr through RES_OPTIONS environment variable: > > RES_OPTIONS='srcaddr:2001:1470:ff80::53:64' ./your-program-here > > The value gets truncated after the first colon resulting in srcaddr=2001. > > The fix: > > > --- lib/Net/DNS/Resolver/Base.pm~ > +++ lib/Net/DNS/Resolver/Base.pm > @@ -219,5 +219,5 @@ > if (exists $ENV{'RES_OPTIONS'}) { > foreach ($ENV{'RES_OPTIONS'} =~ m/(\S+)/g) { > - my ($name, $val) = split(m/:/); > + my ($name, $val) = split(m/:/,$_,2); > $val = 1 unless defined $val; > $config->{$name} = $val if exists
$config->{$name};