From 5e2df7fc1c71c2e876e8eb1f99f7b3c8419ea72c Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Thu, 23 May 2013 08:05:00 -0300 Subject: Use global aliastable and proper fix #2941 --- usr/local/www/system_routes_edit.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr/local/www/system_routes_edit.php b/usr/local/www/system_routes_edit.php index ed9362a..a65db4a 100755 --- a/usr/local/www/system_routes_edit.php +++ b/usr/local/www/system_routes_edit.php @@ -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; -- cgit v1.1