Skip to content

Commit

Permalink
Merge pull request #44475 from nextcloud/fix/disabled-ipv6
Browse files Browse the repository at this point in the history
  • Loading branch information
Altahrim authored Mar 26, 2024
2 parents 0cb691d + 7e4be1f commit f8d1487
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/private/Http/Client/DnsPinMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ private function dnsResolve(string $target, int $recursionCount) : array {
$soaDnsEntry = $this->soaRecord($target);
$dnsNegativeTtl = $soaDnsEntry['minimum-ttl'] ?? null;

$dnsTypes = [DNS_A, DNS_AAAA, DNS_CNAME];
$dnsTypes = \defined('AF_INET6') || @inet_pton('::1')
? [DNS_A, DNS_AAAA, DNS_CNAME]
: [DNS_A, DNS_CNAME];
foreach ($dnsTypes as $dnsType) {
if ($this->negativeDnsCache->isNegativeCached($target, $dnsType)) {
continue;
Expand Down

0 comments on commit f8d1487

Please sign in to comment.