Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: alexander.bluhm [...] gmx.net
bortzmeyer [...] nic.fr
lukasz [...] trabinski.net
Cc:
AdminCc:

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



Subject: Net::DNS::Reolver::Base->read_config_file list
Download (untitled) / with headers
text/plain 3.3k
The file /etc/resolv.conf may contain more than one search or nameserver keyword. In Net-DNS-0.75 a bug has been introduced that only the last line is taken. Before that, all values were pushed together, but the push has been removed in 0.75. It worked with 0.74. This little patch fixes the issue. --- lib/Net/DNS/Resolver/Base.pm.orig Thu May 8 10:12:03 2014 +++ lib/Net/DNS/Resolver/Base.pm Tue May 13 00:35:14 2014 @@ -242,12 +242,14 @@ sub read_config_file { }; /^search/ && do { - ( $keyword, @searchlist ) = split; + ( $keyword, my @list ) = split; + push @searchlist, @list; next; }; /^nameserver/ && do { - ( $keyword, @ns ) = split; + ( $keyword, my @list ) = split; + push @ns, @list; foreach my $ns (@ns) { $ns = '0.0.0.0' if $ns eq '0'; } OpenBSD t430s.bluhm.invalid 5.5 GENERIC.MP#76 amd64 Summary of my perl5 (revision 5 version 18 subversion 2) configuration: Platform: osname=openbsd, osvers=5.5, archname=amd64-openbsd uname='openbsd' config_args='-dsE -Dopenbsd_distribution=defined -Dccflags=-DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE -Dmksymlinks' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE -fno-strict-aliasing -fno-delete-null-pointer-checks -pipe -fstack-protector -I/usr/local/include', optimize='-O2', cppflags='-DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE -fno-strict-aliasing -fno-delete-null-pointer-checks -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.2.1 20070719 ', gccosandvers='openbsd5.5' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc', ldflags ='-Wl,-E -fstack-protector' libpth=/usr/lib libs=-lm -lutil -lc perllibs=-lm -lutil -lc libc=/usr/lib/libc.so.74.2, so=so, useshrplib=true, libperl=libperl.so.15.0 gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-R/usr/libdata/perl5/amd64-openbsd/5.18.2/CORE' cccdlflags='-DPIC -fPIC ', lddlflags='-shared -fPIC -fstack-protector' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES USE_LOCALE USE_LOCALE_CTYPE USE_PERLIO USE_PERL_ATOF Locally applied patches: uncommitted-changes Built under openbsd Compiled at May 12 2014 22:30:04 @INC: /usr/local/libdata/perl5/site_perl/amd64-openbsd /usr/libdata/perl5/site_perl/amd64-openbsd /usr/local/libdata/perl5/site_perl /usr/libdata/perl5/site_perl /usr/libdata/perl5/amd64-openbsd/5.18.2 /usr/local/libdata/perl5/amd64-openbsd/5.18.2 /usr/libdata/perl5 /usr/local/libdata/perl5 .
From: rwfranks [...] acm.org
Download (untitled) / with headers
text/plain 472b
On Mon May 12 18:57:38 2014, bluhm wrote: Show quoted text
> The file /etc/resolv.conf may contain more than one search or > nameserver keyword.
There can be more than one nameserver line, the content of which are intended to be concatenated to form the nameservers() list. The correct behaviour will be restored in 0.76 The domain and search keywords are mutually exclusive. If more than one instance of these keywords is present, the last instance wins. [linux resolv.conf man page]
CC: bortzmeyer [...] nic.fr
Subject: Two regressions in 0.75 (IPv6 and names of name servers)
Date: Thu, 22 May 2014 21:47:21 +0200
To: bug-Net-DNS [...] rt.cpan.org
From: Stephane Bortzmeyer <bortzmeyer [...] nic.fr>
Download (untitled) / with headers
text/plain 4.3k
I have a /etc/resolv.conf which contains IPv6 addresses. With 0.68, this code worked: #!/usr/bin/perl use Net::DNS::Resolver; my $res = Net::DNS::Resolver->new; print $res->nameservers, "\n"; $res->nameserver('8.8.8.8'); print $res->nameservers, "\n"; $res->nameserver('a.root-servers.net'); print $res->nameservers, "\n"; It displayed: % perl test-dns.pl ::1192.134.4.162192.134.4.163 8.8.8.8 198.41.0.4 % With 0.75, parsing of resolv.conf fails silently: % perl test-dns.pl 8.8.8.8 % If I modify the script to use a custom resolv.conf with only IPv4 addresses: my $res = Net::DNS::Resolver->new(config_file => '/etc/resolv-ipv4only.conf'); parsing works: % perl test-dns.pl 192.134.4.163 8.8.8.8 % But using names (and not IP addresses) still fails. It worked before and several programs (not mine, programs retrieved from various places) depend on this behaviour. % perl -V Summary of my perl5 (revision 5 version 18 subversion 2) configuration: Platform: osname=linux, osvers=3.4.75-1-arch, archname=armv6l-linux-thread-multi uname='linux root-armv6-copy 3.4.75-1-arch #1 smp preempt mon jan 6 21:20:50 mst 2014 armv6l gnulinux ' config_args='-des -Dusethreads -Duseshrplib -Doptimize=-march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -Dprefix=/usr -Dvendorprefix=/usr -Dprivlib=/usr/share/perl5/core_perl -Darchlib=/usr/lib/perl5/core_perl -Dsitelib=/usr/share/perl5/site_perl -Dsitearch=/usr/lib/perl5/site_perl -Dvendorlib=/usr/share/perl5/vendor_perl -Dvendorarch=/usr/lib/perl5/vendor_perl -Dscriptdir=/usr/bin/core_perl -Dsitescript=/usr/bin/site_perl -Dvendorscript=/usr/bin/vendor_perl -Dinc_version_list=none -Dman1ext=1perl -Dman3ext=3perl -Dlddlflags=-shared -Wl,-O1,--sort-common,--as-needed,-z,relro -Dldflags=-Wl,-O1,--sort-common,--as-needed,-z,relro' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4', cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.7.2', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc', ldflags ='-Wl,-O1,--sort-common,--as-needed,-z,relro -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=/lib/libc-2.17.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.17' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE' cccdlflags='-fPIC', lddlflags='-shared -Wl,-O1,--sort-common,--as-needed,-z,relro -L/usr/local/lib -fstack-protector' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API Built under linux Compiled at Jan 14 2014 02:12:40 @INC: . /home/stephane/lib /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl ArchLinux % uname -a Linux alarmpi 3.12.20-1-ARCH #1 PREEMPT Sun May 18 12:13:26 MDT 2014 armv6l GNU/Linux
Download (untitled) / with headers
text/plain 163b
Stephane, could you please try if this developers release resolves the issue: http://www.cpan.org/authors/id/N/NL/NLNETLABS/Net-DNS-0.75_1.tar.gz Thanks! Willem
CC: Bartłomiej Solarz-Niesłuchowski <Bartlomiej.Solarz-Niesluchowski [...] wit.edu.pl>
Subject: perl-Net-DNS-0.75 - problem after upgrade
Date: Fri, 23 May 2014 09:53:50 +0200
To: bug-Net-DNS [...] rt.cpan.org
From: Łukasz Trąbiński <lukasz [...] trabinski.net>
Download (untitled) / with headers
text/plain 779b
Hi After upgrade to perl-Net-DNS-0.75 we have problem with module. If you have more than one nameserver in /etc/resolver.conf module doesn't work correctly: Example: oceanic:/usr/share/doc/perl-Net-DNS-0.75/demo# cat /etc/resolv.conf search wsisiz.edu.pl #domain .wsisiz.edu.pl nameserver 2001:1a68:a::40 nameserver 213.135.44.40 nameserver 213.135.47.126 nameserver 213.135.34.25 nameserver 212.87.0.37 oceanic:/usr/share/doc/perl-Net-DNS-0.75/demo# perl mx wsisiz.edu.pl ^C time out Only one nameserver resolver in /etc/resolv.conf and it's work OK: oceanic:/usr/share/doc/perl-Net-DNS-0.75/demo# cat /etc/resolv.conf search wsisiz.edu.pl nameserver 2001:1a68:a::40 oceanic:/usr/share/doc/perl-Net-DNS-0.75/demo# perl mx wsisiz.edu.pl 0 dervish.wsisiz.edu.pl
CC: bortzmeyer [...] nic.fr
Subject: Re: [rt.cpan.org #95878] Two regressions in 0.75 (IPv6 and names of name servers)
Date: Fri, 23 May 2014 09:57:17 +0200
To: NLnet Labs via RT <bug-Net-DNS [...] rt.cpan.org>
From: Stephane Bortzmeyer <bortzmeyer [...] nic.fr>
Download (untitled) / with headers
text/plain 343b
On Thu, May 22, 2014 at 05:00:45PM -0400, NLnet Labs via RT <bug-Net-DNS@rt.cpan.org> wrote a message of 8 lines which said: Show quoted text
> Stephane, could you please try if this developers release resolves the issue: > > http://www.cpan.org/authors/id/N/NL/NLNETLABS/Net-DNS-0.75_1.tar.gz
It works perfectly, and solves the two regressions, thanks.
Download (untitled) / with headers
text/plain 1.1k
Hi Łukasz, More people are effected by this bug. I think a quick bugfix release for this issue might be wise. In the mean time you can use this developers release to mitigate. http://www.cpan.org/authors/id/N/NL/NLNETLABS/Net-DNS-0.75_1.tar.gz . Best regards, -- Willem On Fri 23 Mei 2014 03:54:00, lukasz@trabinski.net wrote: Show quoted text
> Hi > > After upgrade to perl-Net-DNS-0.75 we have problem with module. > > If you have more than one nameserver in /etc/resolver.conf module doesn't > work correctly: > > > Example: > > oceanic:/usr/share/doc/perl-Net-DNS-0.75/demo# cat /etc/resolv.conf > search wsisiz.edu.pl > #domain .wsisiz.edu.pl > nameserver 2001:1a68:a::40 > nameserver 213.135.44.40 > nameserver 213.135.47.126 > nameserver 213.135.34.25 > nameserver 212.87.0.37 > > > > oceanic:/usr/share/doc/perl-Net-DNS-0.75/demo# perl mx wsisiz.edu.pl > ^C > > time out > > Only one nameserver resolver in /etc/resolv.conf and it's work OK: > > oceanic:/usr/share/doc/perl-Net-DNS-0.75/demo# cat /etc/resolv.conf > search wsisiz.edu.pl > nameserver 2001:1a68:a::40 > > oceanic:/usr/share/doc/perl-Net-DNS-0.75/demo# perl mx wsisiz.edu.pl > 0 dervish.wsisiz.edu.pl
Resolved in 0.76


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.