Bug #52101 [Asn]: dns_get_record() - garbage in 'ipv6' field
| From: | felipe@php.net | Date: | Thu, 17 Jun 2010 00:14:27 +0000 |
| Subject: | Bug #52101 [Asn]: dns_get_record() - garbage in 'ipv6' field | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-151560@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52101&edit=1
ID: 52101
Updated by: felipe@php.net
Reported by: grawity at gmail dot com
Summary: dns_get_record() - garbage in 'ipv6' field
Status: Assigned
Type: Bug
Package: Network related
Operating System: Windows XP SP3
PHP Version: 5.3.2
Assigned To: pajoye
New Comment:
On linux I got:
string(33) "2001:470:1f0b:614:2ff:76ff:fe90::"
Previous Comments:
------------------------------------------------------------------------
[2010-06-16 18:29:55] grawity at gmail dot com
Description:
------------
When calling dns_get_record($host, DNS_AAAA) for a single specific
hostname ("snowflake.nullroute.eu.org"), random garbage is appended to
the 'ipv6' field of the DNS response.
The DNS response itself is valid (tested using Wireshark).
<tshark-output filter="udp port 53">
192.168.1.94 -> 8.8.8.8 DNS Standard query AAAA
snowflake.nullroute.eu.org
8.8.8.8 -> 192.168.1.94 DNS Standard query response AAAA
2001:470:1f0b:614:2ff:76ff:fe90:0
</tshark-output>
PHP 5.3.2 (cli) (built: Mar 3 2010 20:47:01)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
Test script:
---------------
<?php
foreach (dns_get_record('snowflake.nullroute.eu.org', DNS_AAAA) as $r)
var_dump($r['ipv6']);
Expected result:
----------------
string(33) "2001:470:1f0b:614:2ff:76ff:fe90::"
Actual result:
--------------
string(37) "2001:470:1f0b:614:2ff:76ff:fe90:XXXXX"
(where XXXXX is five random bytes)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52101&edit=1