summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_gateway_groups_edit.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-05-07 10:10:06 +0000
committerErmal <eri@pfsense.org>2010-05-07 10:10:06 +0000
commitf1e7ae165bf6820c94ba739433794df3d13d4a5f (patch)
treef3df50088d22d8a53765ad35b0fe892871886139 /usr/local/www/system_gateway_groups_edit.php
parent28955fee05007f9a7f8aa4a189969f675c0690dc (diff)
downloadpfsense-f1e7ae165bf6820c94ba739433794df3d13d4a5f.zip
pfsense-f1e7ae165bf6820c94ba739433794df3d13d4a5f.tar.gz
Prevent gateway groups of having the same name as a gateway because this is not valid.
Diffstat (limited to 'usr/local/www/system_gateway_groups_edit.php')
-rwxr-xr-xusr/local/www/system_gateway_groups_edit.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr/local/www/system_gateway_groups_edit.php b/usr/local/www/system_gateway_groups_edit.php
index a17cd94..a3a8186 100755
--- a/usr/local/www/system_gateway_groups_edit.php
+++ b/usr/local/www/system_gateway_groups_edit.php
@@ -110,6 +110,9 @@ if ($_POST) {
/* we have a priority above 0 (disabled), add item to list */
$pconfig['item'][] = "{$gwname}|{$_POST[$gwname]}";
}
+ /* check for overlaps */
+ if ($_POST['name'] == $gwname)
+ $input_errors[] = sprintf(gettext('A gateway group cannot have the same name with a gateway "%s" please choose another name.'), $_POST['name']);
}
if(count($pconfig['item']) == 0) {
OpenPOWER on IntegriCloud