mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Use global aliastable and proper fix #2941
This commit is contained in:
parent
1546aaf0ea
commit
f0867239c1
@ -84,6 +84,8 @@ if (isset($_GET['dup']))
|
||||
|
||||
if ($_POST) {
|
||||
|
||||
global $aliastable;
|
||||
|
||||
unset($input_errors);
|
||||
$pconfig = $_POST;
|
||||
|
||||
@ -126,8 +128,8 @@ if ($_POST) {
|
||||
} elseif (is_alias($_POST['network'])) {
|
||||
$osn = $_POST['network'];
|
||||
$fqdn_found = 0;
|
||||
foreach (filter_expand_alias_array($_POST['network'], true) as $tgt) {
|
||||
if (!is_ipaddr($tgt) && is_hostname($tgt)) {
|
||||
foreach (preg_split('/\s+/', $aliastable[$osn]) as $tgt) {
|
||||
if (!is_ipaddr($tgt)) {
|
||||
if ($fqdn_found === 0) {
|
||||
$input_errors[] = sprintf(gettext("The alias (%s) has one or more FQDNs configured and cannot be used to configure a static route."), $_POST['network']);
|
||||
$fqdn_found = 1;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user