mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-18 18:44:44 +00:00
interfaces: remove remaining legacy_getall_interface_addresses() #3355
This commit is contained in:
parent
48e4fde62e
commit
9105280660
@ -537,7 +537,7 @@ function filter_core_rules_system($fw, $defaults)
|
||||
if (!isset($ifcfg['internal_dynamic']) && $ifcfg['if'] != 'lo0') {
|
||||
$intf_has_v4 = false;
|
||||
$intf_has_v6 = false;
|
||||
foreach (legacy_getall_interface_addresses($ifcfg['if']) as $addr) {
|
||||
foreach (interfaces_addresses($ifcfg['if'], true) as $addr) {
|
||||
$intf_has_v4 = $intf_has_v4 || is_subnetv4($addr);
|
||||
$intf_has_v6 = $intf_has_v6 || is_subnetv6($addr);
|
||||
}
|
||||
|
||||
@ -2330,7 +2330,7 @@ function interface_configure($verbose = false, $interface = 'wan', $reload = fal
|
||||
|
||||
if (!file_exists("/var/run/booting") && !(substr($realif, 0, 4) == "ovpn")) {
|
||||
/* remove all IPv4 and IPv6 addresses */
|
||||
$tmpifaces = legacy_getall_interface_addresses($realif);
|
||||
$tmpifaces = interfaces_addresses($realif, true);
|
||||
foreach ($tmpifaces as $tmpiface) {
|
||||
if (is_ipaddrv6($tmpiface) || is_subnetv6($tmpiface)) {
|
||||
if (!is_linklocal($tmpiface)) {
|
||||
|
||||
@ -64,7 +64,7 @@ function does_vip_exist($vip)
|
||||
return false;
|
||||
}
|
||||
|
||||
$ifacedata = legacy_getall_interface_addresses($realif);
|
||||
$ifacedata = interfaces_addresses($realif, true);
|
||||
foreach ($ifacedata as $vipips) {
|
||||
if ($vipips == "{$vip['subnet']}/{$vip['subnet_bits']}") {
|
||||
return true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user