[exim-cvs] Testsuite: disallow :: as a usable ipv6 address

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] Testsuite: disallow :: as a usable ipv6 address
Gitweb: https://git.exim.org/exim.git/commitdiff/8af2888bc8f9a896bbf754ac47e3eba86fd87eac
Commit:     8af2888bc8f9a896bbf754ac47e3eba86fd87eac
Parent:     3c4796bc6ff2144da88bf72473b3da1bd0fb925f
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Thu Sep 26 22:36:38 2019 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Thu Sep 26 22:36:38 2019 +0100


    Testsuite: disallow :: as a usable ipv6 address
---
 test/runtest | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)


diff --git a/test/runtest b/test/runtest
index ec9c72c..45ee6e2 100755
--- a/test/runtest
+++ b/test/runtest
@@ -3410,14 +3410,13 @@ while (not ($parm_ipv4 and $parm_ipv6) and defined($_ = <IFCONFIG>))
     # It would ne nice to be able to vary the /16 used for manyhome; we could take
     # an option to runtest used here - but we'd also have to pass it on to fakens.
     # Possibly an environment variable?
-    next if $1 =~ /^(?:127|10\.250)\./;
-    next if $1 eq '0.0.0.0';
+    next if $1 eq '0.0.0.0' or $1 =~ /^(?:127|10\.250)\./;
     $parm_ipv4 = $1;
     }


   if (not $parm_ipv6 and /^\s*inet6(?:\saddr)?:?\s?([abcdef\d:]+)(?:%[^ \/]+)?(?:\/\d+)?/i)
     {
-    next if $1 eq '::1' or $1 =~ /^fe80/i;
+    next if $1 eq '::' or $1 eq '::1' or $1 =~ /^fe80/i;
     $parm_ipv6 = $1;
     }
   }