]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ipv6.md: mention IPv4 mapped addresses
authorDaniel Stenberg <daniel@haxx.se>
Fri, 15 Mar 2024 08:38:21 +0000 (09:38 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 15 Mar 2024 13:56:37 +0000 (14:56 +0100)
Reported-by: Josh Soref
Assisted-by: Jay Satiro
Fixes #13112
Closes #13131

docs/cmdline-opts/ipv6.md
tests/test1275.pl

index c33a24c3faacebb77d4002eaf05f98a6185d0a0f..547f4917c2c09141ba4d9273535022f2623eeb28 100644 (file)
@@ -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.
index 5676a7637fd45c09451aa7f6d097e17fdcdcd68a..47ce7995789f072c942c76534cc0c88652269416 100755 (executable)
@@ -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);