mirror of
https://github.com/lucaspalomodevelop/opnsense-core.git
synced 2026-03-13 00:07:27 +00:00
radvd: refactor use of get_configured_carp_interface_list()
This commit is contained in:
parent
ef1c4e07c8
commit
97da2221d7
@ -343,13 +343,13 @@ include("head.inc");
|
||||
<?php
|
||||
$carplist = [];
|
||||
$aliaslist = [];
|
||||
foreach (get_configured_carp_interface_list() as $ifname => $vip) {
|
||||
if ((preg_match("/^{$if}_/", $ifname)) && (is_linklocal($vip))) {
|
||||
$carplist[$ifname] = convert_friendly_interface_to_friendly_descr($ifname);
|
||||
}
|
||||
}
|
||||
foreach (config_read_array('virtualip', 'vip') as $vip) {
|
||||
if ($vip['mode'] == 'ipalias' && $if == $vip['interface'] && is_linklocal($vip['subnet'])) {
|
||||
if ($if != $vip['interface'] || !is_linklocal($vip['subnet'])) {
|
||||
continue;
|
||||
} elseif ($vip['mode'] == 'carp') {
|
||||
$ifname = "{$vip['interface']}_vip{$vip['vhid']}"; /* XXX this code shouldn't know how to construct this */
|
||||
$carplist[$ifname] = convert_friendly_interface_to_friendly_descr($ifname);
|
||||
} elseif ($vip['mode'] == 'ipalias') {
|
||||
$aliaslist[$vip['subnet']] = ($vip['descr'] ?? '') . ' (' . $vip['subnet'] . ')';
|
||||
}
|
||||
} ?>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user