Testsuite: disallow :: as a usable ipv6 address
[exim.git] / test / runtest
index aadd0f1990d8dc56eafca6b676ad1f6490ced68d..45ee6e208b173bd609893a89f555add5d9aaadd2 100755 (executable)
@@ -1085,7 +1085,7 @@ RESET_AFTER_EXTRA_LINE_READ:
     next if /name=localhost address=::1/;
 
     # drop pdkim debugging header
-    next if /^PDKIM( <<<<<<<<<<<<<<<<<<<<<<<<<<<<<+|: no signatures)$/;
+    next if /^DKIM( <<<<<<<<<<<<<<<<<<<<<<<<<<<<<+|: no signatures)$/;
 
     # Various other IPv6 lines must be omitted too
 
@@ -1168,7 +1168,7 @@ RESET_AFTER_EXTRA_LINE_READ:
     # are unset, because dane ain't always there.
     next if /in\shosts_require_dane\?\sno\s\(option\sunset\)/x;
 
-    # DISABLE_OCSP 
+    # DISABLE_OCSP
     next if /in hosts_requ(est|ire)_ocsp\? (no|yes)/;
 
     # SUPPORT_PROXY
@@ -1208,7 +1208,7 @@ RESET_AFTER_EXTRA_LINE_READ:
       }
 
     # Not all platforms build with DKIM enabled
-    next if /^PDKIM >> Body data for hash, canonicalized/;
+    next if /^DKIM >> Body data for hash, canonicalized/;
 
     # Not all platforms build with SPF enabled
     next if /^(spf_conn_init|SPF_dns_exim_new|spf_compile\.c)/;
@@ -1218,7 +1218,7 @@ RESET_AFTER_EXTRA_LINE_READ:
 
     #  Parts of DKIM-specific debug output depend on the time/date
     next if /^date:\w+,\{SP\}/;
-    next if /^PDKIM \[[^[]+\] (Header hash|b) computed:/;
+    next if /^DKIM \[[^[]+\] (Header hash|b) computed:/;
 
     # Not all platforms support TCP Fast Open, and the compile omits the check
     if (s/\S+ in hosts_try_fastopen\? (no \(option unset\)|yes \(matched "\*"\))\n$//)
@@ -1234,7 +1234,7 @@ RESET_AFTER_EXTRA_LINE_READ:
 
     if (/^([0-9: ]*                                            # possible timestamp
        Connecting\ to\ [^ ]+\ [^ ]+(\ from\ [^ ]+)?)\ \.\.\.
-       \ .*TFO\ mode\ 
+       \ .*TFO\ mode\x20
        (sendto,\ no\ data:\ EINPROGRESS                        # Linux
        |connection\ attempt\ to\ [^,]+,\ 0\ data)              # MacOS & no-support
        $/x)
@@ -3399,6 +3399,7 @@ else
 
 # Find this host's IP addresses - there may be many, of course, but we keep
 # one of each type (IPv4 and IPv6).
+#XXX it would be good to avoid non-UP interfaces
 
 open(IFCONFIG, '-|', (grep { -x "$_/ip" } split /:/, $ENV{PATH}) ? 'ip address' : 'ifconfig -a')
   or die "** Cannot run 'ip address' or 'ifconfig -a'\n";
@@ -3406,13 +3407,16 @@ while (not ($parm_ipv4 and $parm_ipv6) and defined($_ = <IFCONFIG>))
   {
   if (not $parm_ipv4 and /^\s*inet(?:\saddr)?:?\s?(\d+\.\d+\.\d+\.\d+)(?:\/\d+)?\s/i)
     {
-    next if $1 =~ /^(?:127|10)\./;
+    # 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 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;
     }
   }