Commit 153e7bc9 authored by Ad Schellevis's avatar Ad Schellevis

refactor is_specialnet(), interface administration contains all now

parent 3ef4f1dc
......@@ -554,16 +554,16 @@ function pconfig_to_address(&$adr, $padr, $pmask, $pnot=false, $pbeginport=0, $p
function is_specialnet($net)
{
global $specialsrcdst;
if (!$net) {
return false;
}
if (is_array($specialsrcdst) && in_array($net, $specialsrcdst)) {
if (in_array($net, array('any','(self)'))) {
return true;
} else {
return false;
foreach (legacy_config_get_interfaces(array("enable" => true)) as $ifent => $ifdetail) {
if ($ifent == $net || (!isset($ifdetail['virtual']) && $ifent."ip" == $net)) {
return true;
}
}
}
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment