aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBenjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>2024-03-26 18:14:49 +0100
committerGitHub <noreply@github.com>2024-03-26 18:14:49 +0100
commitf8d1487dcdd0c9b5f41b1e65447d1ff70dd141d8 (patch)
treea1270b30ad63c34081e6cc4e6d78db064185dccc /lib
parent0cb691d07e0a7c84eaf66dfee8a533d1df621f5c (diff)
parent7e4be1fcfd5f652345848257472b9bfb3285779a (diff)
downloadnextcloud-server-f8d1487dcdd0c9b5f41b1e65447d1ff70dd141d8.tar.gz
nextcloud-server-f8d1487dcdd0c9b5f41b1e65447d1ff70dd141d8.zip
Merge pull request #44475 from nextcloud/fix/disabled-ipv6
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Http/Client/DnsPinMiddleware.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Http/Client/DnsPinMiddleware.php b/lib/private/Http/Client/DnsPinMiddleware.php
index 518281e4af0..0d2f8d0bdc8 100644
--- a/lib/private/Http/Client/DnsPinMiddleware.php
+++ b/lib/private/Http/Client/DnsPinMiddleware.php
@@ -75,7 +75,9 @@ class DnsPinMiddleware {
$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;