mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 09:34:39 +00:00
interfaces: fix a crash report
There could be another error in here with the reported IPv6 issues...
This commit is contained in:
parent
e1733a01bf
commit
6c6b8f1d29
@ -331,9 +331,14 @@ function legacy_getall_interface_addresses($ifs)
|
||||
{
|
||||
$result = array();
|
||||
$intf_details = legacy_interface_details($ifs);
|
||||
foreach (array("ipv4", "ipv6") as $proto) {
|
||||
foreach (array('ipv4', 'ipv6') as $proto) {
|
||||
if (empty($intf_details[$proto])) {
|
||||
continue;
|
||||
}
|
||||
foreach ($intf_details[$proto] as $address) {
|
||||
$result[] = $address['ipaddr'] . "/" . $address['subnetbits'];
|
||||
if (!empty($address['ipaddr']) && !empty($address['subnetbits'])) {
|
||||
$result[] = $address['ipaddr'] . '/' . $address['subnetbits'];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user