Bug #73594 [Opn->Csd]: dns_get_record does not populate $additional out parameter

From: Date: Sun, 18 Dec 2016 19:55:14 +0000
Subject: Bug #73594 [Opn->Csd]: dns_get_record does not populate $additional out parameter
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206114@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73594&edit=1 ID: 73594 Updated by: ab@php.net Reported by: weirdan at gmail dot com Summary: dns_get_record does not populate $additional out parameter -Status: Open +Status: Closed Type: Bug Package: *Network Functions Operating System: CentOS 7 PHP Version: 7.1.0RC6 Block user comment: N Private report: N New Comment: Automatic comment on behalf of weirdan@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=c78fd4568e24b8c68062be0f98163b5f45213bae Log: Fixed bug #73594 Previous Comments: ------------------------------------------------------------------------ [2016-12-18 00:18:42] ab@php.net Related To: Bug #73716 ------------------------------------------------------------------------ [2016-12-02 13:05:45] weirdan at gmail dot com Is there anything else I can do to get this merged? ------------------------------------------------------------------------ [2016-11-25 01:53:46] weirdan at gmail dot com Fixed the bug, preparing tests and pull request. This bug affects PHP7.0.0+, but does not affect PHP5.6.* ------------------------------------------------------------------------ [2016-11-23 19:47:31] weirdan at gmail dot com Description: ------------ After upgrading from PHP 5.6.27 to 7.1.0RC6 dns_get_record stopped returning additional records in its out parameter. I've confirmed with tcpdump that PHP (libresolv I imagine) sends the same request as before, and gets the same answer (with additional records), yet $additional array in the following code is no longer populated. Test script: --------------- The actual code I'm trying to get working is: <?php $auth = []; $additional = []; var_dump(dns_get_record("_mysql._slave.service.consul", DNS_SRV, $auth, $additional), $auth, $additional); ?> However it depends on consul service discovery. Simpler reproduce script would be: <?php $auth = []; $additional = []; var_dump(count(dns_get_record("php.net", DNS_ANY, $auth, $additional)), count($auth), count($additional)); ?> Yet it requires known DNS server that returns additional records to be configured as your preferred recursor in /etc/resolv.conf (I used PHP.net's authoritative DNS server below): nameserver 162.159.24.53 Expected result: ---------------- With php.net script above, with resolv.conf configured as described there, running on PHP 5.6.27 I get: int(9) int(0) int(8) <--- $additional is NOT empty Actual result: -------------- Running on PHP 7.1.RC6 (otherwise configured the same) I get: int(9) int(0) int(0) <--- $additional IS empty ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73594&edit=1

« previous php.bugs (#206114) next »