From 79cdae4fc7f3ffb1a9de1ddde15e39bfe39a992b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 15 Mar 2024 09:38:21 +0100 Subject: [PATCH] ipv6.md: mention IPv4 mapped addresses Reported-by: Josh Soref Assisted-by: Jay Satiro Fixes #13112 Closes #13131 --- docs/cmdline-opts/ipv6.md | 4 ++++ tests/test1275.pl | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/cmdline-opts/ipv6.md b/docs/cmdline-opts/ipv6.md index c33a24c3fa..547f4917c2 100644 --- a/docs/cmdline-opts/ipv6.md +++ b/docs/cmdline-opts/ipv6.md @@ -22,3 +22,7 @@ Example: Use IPv6 addresses only when resolving hostnames, and not for example try IPv4. + +Your resolver may respond to an IPv6-only resolve request by returning IPv6 +addresses that contain "mapped" IPv4 addresses for compatibility purposes. +macOS is known to do this. diff --git a/tests/test1275.pl b/tests/test1275.pl index 5676a7637f..47ce799578 100755 --- a/tests/test1275.pl +++ b/tests/test1275.pl @@ -31,6 +31,7 @@ my $errors; my %accepted=('curl' => 1, 'libcurl' => 1, + 'macOS' => 1, 'c-ares' => 1); sub checkfile { @@ -65,7 +66,7 @@ sub checkfile { $ignore ^= 1; } if(!$ignore) { - if(($prevl =~ /\.\z/) && ($line =~ /^( *)([a-z-]+)/)) { + if(($prevl =~ /\.\z/) && ($line =~ /^( *)([a-z][A-Za-z-]*)/)) { my ($prefix, $word) = ($1, $2); if($word =~ /^[a-z]/ && !$accepted{$word}) { my $c = length($prefix); -- 2.47.3