summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-05-27 07:27:45 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-05-27 07:27:45 -0300
commitc82dcc1d3bafa91b6b4866f2c65ded717e161a2e (patch)
treeb489e84b75f71d7a610ca84513fbedc6759416a2 /usr
parent356e86d415b4699f6994db7ff683294d8cc9d1a0 (diff)
downloadpfsense-c82dcc1d3bafa91b6b4866f2c65ded717e161a2e.zip
pfsense-c82dcc1d3bafa91b6b4866f2c65ded717e161a2e.tar.gz
Permit to use aliases containing hostnames on static routes
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php14
-rwxr-xr-xusr/local/www/system_routes_edit.php8
2 files changed, 0 insertions, 22 deletions
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index a41770c..ca5fd9e 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -254,15 +254,6 @@ if ($_POST) {
}
} else {
/* item is a normal alias type */
- $used_for_routes = 0;
- if (isset($config['staticroutes']['route']) && is_array($config['staticroutes']['route'])) {
- foreach($config['staticroutes']['route'] as $route) {
- if ($route['network'] == $_POST['origname']) {
- $used_for_routes = 1;
- break;
- }
- }
- }
$wrongaliases = "";
for($x=0; $x<4999; $x++) {
if($_POST["address{$x}"] <> "") {
@@ -281,11 +272,6 @@ if ($_POST) {
&& !is_hostname($_POST["address{$x}"])
&& !is_iprange($_POST["address{$x}"]))
$input_errors[] = sprintf(gettext('%1$s is not a valid %2$s alias.'), $_POST["address{$x}"], $_POST['type']);
- if (($used_for_routes === 1)
- && !is_ipaddr($_POST["address{$x}"])
- && !is_iprange($_POST["address{$x}"])
- && is_hostname($_POST["address{$x}"]))
- $input_errors[] = gettext('This alias is used on a static route and cannot contain FQDNs.');
}
if (is_iprange($_POST["address{$x}"])) {
list($startip, $endip) = explode('-', $_POST["address{$x}"]);
diff --git a/usr/local/www/system_routes_edit.php b/usr/local/www/system_routes_edit.php
index a65db4a..ffdfae7 100755
--- a/usr/local/www/system_routes_edit.php
+++ b/usr/local/www/system_routes_edit.php
@@ -127,15 +127,7 @@ if ($_POST) {
}
} elseif (is_alias($_POST['network'])) {
$osn = $_POST['network'];
- $fqdn_found = 0;
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;
- }
- continue;
- }
if (is_ipaddrv4($tgt))
$tgt .= "/32";
if (is_ipaddrv6($tgt))
OpenPOWER on IntegriCloud