Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.7

Bug #17957 Unable to query root
Submitted: 2010-10-15 20:27 UTC
From: jerrywilborn Assigned:
Status: Open Package: Net_DNS (version 1.0.5)
PHP Version: 5.3.3 OS: Fedora
Roadmaps: (Not assigned)    
Subscription  


 [2010-10-15 20:27 UTC] jerrywilborn (Jerry Wilborn)
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.

Comments

 [2010-10-25 05:32 UTC] doconnor (Daniel O'Connor)
Hi Jerry, Is this regression from a previous release; or a new defect?
 [2010-10-25 06:32 UTC] jerrywilborn (Jerry Wilborn)
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-26 16:28 UTC] doconnor (Daniel O'Connor)
More than you know! Thanks for the clarity;
 [2010-11-03 14:54 UTC] bate (Marco Kaiser)
-Status: Open +Status: Feedback
 [2012-01-27 19:16 UTC] doconnor (Daniel O'Connor)
-Status: Feedback +Status: Open