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:06:04 -0300 |
commit | f0867239c1b15c711ea3c6eefd896c2d2aaefcae (patch) | |
tree | 12eba14510706dfc715c5b5d7b38867c5e6a8250 | |
parent | 1546aaf0ea8f0cd126b36b04407d51fbbc446576 (diff) | |
download | pfsense-f0867239c1b15c711ea3c6eefd896c2d2aaefcae.zip pfsense-f0867239c1b15c711ea3c6eefd896c2d2aaefcae.tar.gz |
Use global aliastable and proper fix #2941
-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; |