Edit report at http://bugs.php.net/bug.php?id=52101&edit=1
ID: 52101 Updated by: paj...@php.net Reported by: grawity at gmail dot com Summary: dns_get_record() - garbage in 'ipv6' field -Status: Assigned +Status: Closed Type: Bug Package: Network related Operating System: Windows XP SP3 PHP Version: 5.3.2 Assigned To: pajoye New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2010-06-17 11:26:31] paj...@php.net Automatic comment from SVN on behalf of pajoye Revision: http://svn.php.net/viewvc/?view=revision&revision=300510 Log: - Fix bug #52101, dns_get_record()garbage in 'ipv6' field ------------------------------------------------------------------------ [2010-06-17 02:14:26] fel...@php.net On linux I got: string(33) "2001:470:1f0b:614:2ff:76ff:fe90::" ------------------------------------------------------------------------ [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