From owner-freebsd-ports@FreeBSD.ORG Fri Aug 8 01:47:00 2014 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7D16EF1 for ; Fri, 8 Aug 2014 01:47:00 +0000 (UTC) Received: from www.accelix.net (www.accelix.net [209.183.228.220]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "server1.accelix.com", Issuer "server1.accelix.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 82554250A for ; Fri, 8 Aug 2014 01:46:59 +0000 (UTC) Received: from Mozart (localhost [127.0.0.1]) (authenticated bits=0) by www.accelix.net (8.14.7/8.14.7) with ESMTP id s781ScUc026636; Thu, 7 Aug 2014 21:28:39 -0400 (EDT) (envelope-from dgs@accelix.net) From: "Dave Stoddard" To: Subject: FreeBSD Port: jdresolve-0.6.1_1 Date: Thu, 7 Aug 2014 21:28:42 -0400 Message-ID: <046a01cfb2a8$17a9d650$46fd82f0$@net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac+yqBbTS7A+BU1uQLKL+Dl/1G26ug== Content-Language: en-us X-Spam-Status: No, score=-100.0 required=6.0 tests=SHORTCIRCUIT, USER_IN_WHITELIST shortcircuit=ham autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on www.accelix.net Cc: ports@FreeBSD.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2014 01:47:00 -0000 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 8/07/2014). 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: www freebsd org 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. Best, Dave Stoddard dgs at accelix.net 301-455-0245 : cell