Subject: | Wrong interpretation of an IPv6 alternative form when obtaining a PTR record |
Obtaining a PTR record belonging to 2001:1470:ff80:88::525f:8490 :
good case:
$ dig -x 2001:1470:ff80:88::525f:8490 | fgrep 'PTR '
0.9.4.8.f.5.2.5.0.0.0.0.0.0.0.0.8.8.0.0.0.8.f.f.0.7.4.1.1.0.0.2.ip6.arpa
. 3338 IN PTR test-example.ijs.si.
$ perl -MNet::DNS::Resolver -e '
$p=Net::DNS::Resolver->new->send("2001:1470:ff80:88::525f:8490");
printf("%s, %s\n",$_->type,$_->ptrdname) for $p->answer'
PTR, test-example.ijs.si
Now the same thing, using alternative form of the same address
(RFC 4291):
(good, same result as above):
$ dig -x 2001:1470:ff80:88::82.95.132.144 | fgrep 'PTR '
0.9.4.8.f.5.2.5.0.0.0.0.0.0.0.0.8.8.0.0.0.8.f.f.0.7.4.1.1.0.0.2.ip6.arpa
. 3085 IN PTR test-example.ijs.si.
$ perl -MNet::DNS::Resolver -e '
$p=Net::DNS::Resolver->new->send("2001:1470:ff80:88::82.95.132.144");
printf("%s, %s\n",$_->type,$_->ptrdname) for $p->answer'
PTR, peer.kolkman.org
Oops! Wrong :)