FreeBSD Port: jdresolve-0.6.1_1

Dave Stoddard dgs at
Fri Aug 8 01:47:00 UTC 2014

I installed the jdresolve port on FreeBSD 10.0-RELEASE-p6 using
Perl 5.16.3 and Net::DNS version 0.78 (the latest version as of

When I ran jdresolve against my Apache log file, I was getting
the string "Net::DNS::DomainName1035=HASH(0x805788a08)" instead
of the host names I was expecting.  This is indicative of a
hash dereferencing error that is occurring due to changes in
the Net::DNS Perl modules.

I traced the problem in jdresolve to line 867, which contained
the following code:

$hosts{$query}{NAME} = $_->{ptrdname};

The $_ object is a Net:DNS:RR object, and ptrdname is a hash
reference containing a number of items.  That reference contains
a reference to another hash called label, which contains a reference
to an array that has the individual name segments of the host name.
For example, if we were resolving the FreeBSD web server's IP address,
the array would contain the following items:


These segments needs to be assembled into a complete host name
for use by jdresolve.  The fix is to replace the old line of code
with this line of code:

$hosts{$query}{NAME} = join(".",@{$_->{ptrdname}->{label}});

This corrects the name resolution error in jdresolve.  You can test
this fix by obtaining a copy of an Apache log file and running the
following test:

jdresolve access.log > replacement.log

The replacement.log file will contain proper host names instead
of IP addresses.  Just thought you might want to know.

Dave Stoddard
dgs at
301-455-0245 : cell

More information about the freebsd-ports mailing list