Bug #17957 [Opn]: Unable to query root
| From: | daniel dot oconnor at gmail dot com | Date: | Mon, 25 Oct 2010 01:32:51 +0000 |
| Subject: | Bug #17957 [Opn]: Unable to query root | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-4966@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=17957&edit=1
ID: 17957
Updated by: daniel.oconnor@gmail.com
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:
Hi Jerry,
Is this regression from a previous release; or a new defect?
Previous Comments:
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=17957&edit=1