diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-05-23 08:05:00 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-05-23 08:05:00 -0300 |
commit | 5e2df7fc1c71c2e876e8eb1f99f7b3c8419ea72c (patch) | |
tree | 15d9866876cea15647fe39cce8332dbd644d48d5 /usr | |
parent | 6134dcf51e10cec9c986d4ae17cf8b1bbdda764f (diff) | |
download | pfsense-5e2df7fc1c71c2e876e8eb1f99f7b3c8419ea72c.zip pfsense-5e2df7fc1c71c2e876e8eb1f99f7b3c8419ea72c.tar.gz |
Use global aliastable and proper fix #2941
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/system_routes_edit.php | 6 |
1 files 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; |