summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-05-23 08:05:00 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-05-23 08:06:04 -0300
commitf0867239c1b15c711ea3c6eefd896c2d2aaefcae (patch)
tree12eba14510706dfc715c5b5d7b38867c5e6a8250
parent1546aaf0ea8f0cd126b36b04407d51fbbc446576 (diff)
downloadpfsense-f0867239c1b15c711ea3c6eefd896c2d2aaefcae.zip
pfsense-f0867239c1b15c711ea3c6eefd896c2d2aaefcae.tar.gz
Use global aliastable and proper fix #2941
-rwxr-xr-xusr/local/www/system_routes_edit.php6
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;
OpenPOWER on IntegriCloud