in reply to Net::DNS::Resolver using IPv6 transport in nameservers
Which outputs...#!/usr/bin/perl use Net::DNS; #use IO::Socket::IP; $testcandidate="cl"; print "IPV4 test...\n"; $res = new Net::DNS::Resolver; $res->tcp_timeout (1) ; $res->retry (1) ; $res->retrans (1) ; $query = $res->nameservers('162.219.53.120'); $query = $res->query($testcandidate, "SOA"); print "What's in the array: \n"; print join ' ', $res->nameservers(); print "\n"; my $serial=($query->answer)[0]->serial, if ($query); print "serial: $serial\n"; print "\n\nIPV6 test...\n"; $res = new Net::DNS::Resolver; $res->tcp_timeout (1) ; $res->retry (1) ; $res->retrans (1) ; $query = $res->nameservers('2620:10a:80d1:1053::120'); $query = $res->query($testcandidate, "SOA"); print "What's in the array: \n"; print join ' ', $res->nameservers(); print "\n"; my $serial=($query->answer)[0]->serial, if ($query); print "serial: $serial\n";
How is it that the IPv6 address isn't even being mentioned when I print the array elements? I thought I was debugging a Net::DNS issue...but it seems I must be doing something wrong with arrays in general? When I throw this into debug, I see: IPV6 test... ;; query(cl, SOA) ;; setting up an AF_INET() family type UDP socket So how do I get it to not use AF_INET?[root@ns01 jzack]# ./snippet IPV4 test... What's in the array: 162.219.53.120 serial: 2020070925 IPV6 test... What's in the array: serial:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Net::DNS::Resolver using IPv6 transport in nameservers
by elsifsheep (Novice) on Jul 09, 2020 at 17:42 UTC | |
by perlfan (Parson) on Jul 11, 2020 at 00:00 UTC |