fix display of ipv6 addresses

This commit is contained in:
glaszig 2019-07-30 22:24:01 +02:00
parent d81d1b0a10
commit 4a5a39c2bc

View file

@ -48,13 +48,8 @@ function DisplayDashboard()
if (!preg_match_all('/inet6 ([a-f0-9:]+)/i', $stdoutIpWRepeatedSpaces, $matchesIpv6Addr)) {
$ipv6Addrs = _('No IPv6 Address Found');
} else {
$numMatchesIpv6Addr = count($matchesIpv6Addr);
for ($i = 1; $i < $numMatchesIpv6Addr; ++$i) {
if ($i > 1) {
$ipv6Addrs .= ' ';
}
$ipv6Addrs .= $matchesIpv6Addr[$i];
if (isset($matchesIpv6Addr[1])) {
$ipv6Addrs = implode(' ', $matchesIpv6Addr[1]);
}
}