summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces_assign.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-11-30 22:16:27 +0000
committerErmal <eri@pfsense.org>2010-11-30 22:16:27 +0000
commit65c5cec3e32245442377ea0134563a47850151ee (patch)
tree10cb1d3f2f76c78e63bbbe452b2b795f72ce2f47 /usr/local/www/interfaces_assign.php
parent5ba5a8de2e26a617180a838ee58eb403312000e0 (diff)
downloadpfsense-65c5cec3e32245442377ea0134563a47850151ee.zip
pfsense-65c5cec3e32245442377ea0134563a47850151ee.tar.gz
Make sure we cannot add interfaces by entering the link directly on url address bar. This does the same check as the one for showing the plus button on interfaces_assign.
Diffstat (limited to 'usr/local/www/interfaces_assign.php')
-rwxr-xr-xusr/local/www/interfaces_assign.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php
index 6bf63ac..e4d349f 100755
--- a/usr/local/www/interfaces_assign.php
+++ b/usr/local/www/interfaces_assign.php
@@ -302,7 +302,7 @@ if ($_GET['act'] == "del") {
}
}
-if ($_GET['act'] == "add") {
+if ($_GET['act'] == "add" && (count($config['interfaces']) < count($portlist))) {
/* find next free optional interface number */
if(!$config['interfaces']['lan']) {
$newifname = gettext("lan");
@@ -348,7 +348,8 @@ if ($_GET['act'] == "add") {
$savemsg = gettext("Interface has been added.");
-}
+} else if ($_GET['act'] == "add")
+ $input_errors[] = "No more interfaces available to be assigned.";
include("head.inc");
OpenPOWER on IntegriCloud