Bug #79561 [Ver->Csd]: dns_get_record() fails with DNS_ALL

From: Date: Mon, 04 May 2020 21:03:36 +0000
Subject: Bug #79561 [Ver->Csd]: dns_get_record() fails with DNS_ALL
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-226918@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79561&edit=1 ID: 79561 Updated by: cmb@php.net Reported by: anrdaemon at yandex dot ru Summary: dns_get_record() fails with DNS_ALL -Status: Verified +Status: Closed Type: Bug Package: *Network Functions Operating System: Windows PHP Version: 7.4.5 Assigned To: cmb Block user comment: N Private report: N New Comment: Automatic comment on behalf of cmbecker69@gmx.de Revision: http://git.php.net/?p=php-src.git;a=commit;h=c40a494406aa3606be964b24d224ec4eb0c936e8 Log: Fix #79561: dns_get_record() fails with DNS_ALL Previous Comments: ------------------------------------------------------------------------ [2020-05-04 14:46:55] cmb@php.net The following pull request has been associated: Patch Name: Fix #79561: dns_get_record() fails with DNS_ALL On GitHub: https://github.com/php/php-src/pull/5524 Patch: https://github.com/php/php-src/pull/5524.patch ------------------------------------------------------------------------ [2020-05-04 14:29:47] cmb@php.net > I think, if library does not support specific RR directly, the > relevant bit should be removed from DNS_ALL. Yes, that's actually the problem, since MSVC runtimes do not yet support CAA records. ------------------------------------------------------------------------ [2020-05-04 13:53:33] cmb@php.net Apparently, commit 280e9cb[1] missed to update dns_win32.c. [1] <http://git.php.net/?p=php-src.git;a=commit;h=280e9cb28d07a69e56ebcde4c368f3053298abe3> ------------------------------------------------------------------------ [2020-05-03 17:48:22] anrdaemon at yandex dot ru Description: ------------ It seems, the DNS_CAA resource record is not supported by Windows builds. Excluding DNS_CAA from DNS_ALL results in successful query. I think, if library does not support specific RR directly, the relevant bit should be removed from DNS_ALL. Additionally: Attempting a raw query with RR=257 results in empty response even if relevant record exists. F.e. google.com: > nslookup -type=CAA google.com. Server: 192.168.1.12 Address: 192.168.1.12#53 Non-authoritative answer: google.com rdata_257 = 0 issue "pki.goog" Authoritative answers can be found from: google.com nameserver = ns4.google.com. google.com nameserver = ns3.google.com. google.com nameserver = ns1.google.com. google.com nameserver = ns2.google.com. ns1.google.com internet address = 216.239.32.10 ns2.google.com internet address = 216.239.34.10 ns3.google.com internet address = 216.239.36.10 ns4.google.com internet address = 216.239.38.10 > php -r 'print_r(dns_get_record("google.com", 257, $x, $y, true));' Array ( ) Possible related: https://bugs.php.net/bug.php?id=52260 Test script: --------------- <?php $rr = dns_get_record("www.php.net", DNS_ALL);// & ~DNS_CAA); print_r($rr); Expected result: ---------------- A resulting array or false is returned. Silently! Actual result: -------------- PHP Warning: dns_get_record(): Type '251721779' not supported in … Excluding DNS_CAA from DNS_ALL results in successful query. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79561&edit=1

« previous php.bugs (#226918) next »