mirror of
https://github.com/opnsense/core.git
synced 2026-02-18 18:18:13 -05:00
interfaces: safe to drop ip_in_interface_alias_subnet()
Only used by isc-dhcp plugin which has its own copy now.
This commit is contained in:
parent
fdbd32be08
commit
808e46d6fa
1 changed files with 0 additions and 18 deletions
|
|
@ -3738,24 +3738,6 @@ function link_interface_to_gif($interface, $update = false, $family = null)
|
|||
return $result;
|
||||
}
|
||||
|
||||
function ip_in_interface_alias_subnet($interface, $ipalias)
|
||||
{
|
||||
if (empty($interface) || !is_ipaddr($ipalias)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (config_read_array('virtualip', 'vip', false) as $vip) {
|
||||
if ($vip['mode'] == 'ipalias' && $vip['interface'] == $interface) {
|
||||
$subnet = is_ipaddrv6($ipalias) ? gen_subnetv6($vip['subnet'], $vip['subnet_bits']) : gen_subnet($vip['subnet'], $vip['subnet_bits']);
|
||||
if (ip_in_subnet($ipalias, "{$subnet}/{$vip['subnet_bits']}")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function get_interface_ip($interface, $ifconfig_details = null)
|
||||
{
|
||||
if (is_ipaddrv4($interface)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue