[exim-cvs] Testsuite: handle OpenBSD version of ifconfig

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] Testsuite: handle OpenBSD version of ifconfig
Gitweb: https://git.exim.org/exim.git/commitdiff/39e69de6d78795c93d5363f5c70240137194eb5e
Commit:     39e69de6d78795c93d5363f5c70240137194eb5e
Parent:     047d749f00f74798bc984d28602fae37dd957760
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sun Oct 6 23:28:25 2019 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sun Oct 6 23:28:25 2019 +0100


    Testsuite: handle OpenBSD version of ifconfig
---
 test/runtest | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


diff --git a/test/runtest b/test/runtest
index ad3a74d..6319f5b 100755
--- a/test/runtest
+++ b/test/runtest
@@ -3406,7 +3406,7 @@ open(IFCONFIG, '-|', (grep { -x "$_/ip" } split /:/, $ENV{PATH}) ? 'ip address'
or die "** Cannot run 'ip address' or 'ifconfig -a'\n";
while (not ($parm_ipv4 and $parm_ipv6) and defined($_ = <IFCONFIG>))
{
- if (/^(?:[0-9]+: )?([^:]+): /) { $ifname = $1; }
+ if (/^(?:[0-9]+: )?([a-z0-9]+): /) { $ifname = $1; }

   if (not $parm_ipv4 and /^\s*inet(?:\saddr)?:?\s?(\d+\.\d+\.\d+\.\d+)(?:\/\d+)?\s/i)
     {
@@ -3419,7 +3419,7 @@ while (not ($parm_ipv4 and $parm_ipv6) and defined($_ = <IFCONFIG>))


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