Edit report at http://pear.php.net/bugs/bug.php?id=17957&edit=1
ID: 17957
Updated by: [email protected]
Reported By: jerry at metairiedata dot com
Summary: Unable to query root
Status: Open
Type: Bug
Package: Net_DNS
Operating System: Fedora
Package Version: 1.0.5
PHP Version: 5.3.3
Roadmap Versions:
New Comment:
More than you know! Thanks for the clarity;
Previous Comments:
------------------------------------------------------------------------
[2010-10-25 02:32:22] jerrywilborn
I tried several previous versions and Net_DNS either exhibited the bug
or was unable to run under PHP5.
I believe it has something to do with Net_DNS stripping the final dot
from queries (thus leaving a blank one)... I'm speculating. Helpful,
huh? :)
------------------------------------------------------------------------
[2010-10-25 01:32:51] doconnor
Hi Jerry,
Is this regression from a previous release; or a new defect?
------------------------------------------------------------------------
[2010-10-15 16:27:16] jerrywilborn
Description:
------------
If you attempt to query the root (.) using buildQuestion, the data
is built incorrectly.
Test script:
---------------
require_once ("Net/DNS.php");
$packet = new Net_DNS_Packet();
$packet->buildQuestion('.', 'SOA', 'IN');
$d = $packet->data();
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
socket_set_option($sock, SOL_SOCKET, SO_RCVTIMEO, array('sec' => 0,
'usec' => 100000));
socket_sendto($sock, $d, strlen($d), 0, '127.0.0.1', 53);
if (socket_recvfrom($sock, $buf, 1024, FALSE, $host, $port) and
$packet->parse($buf)) print $packet->string();
Expected result:
----------------
A question of ./IN/SOA.
Actual result:
--------------
The question becomes ./ANY/ANY.
------------------------------------------------------------------------