summaryrefslogtreecommitdiffstats
path: root/usr/local/www/wizards
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-07-24 18:23:21 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-07-24 18:28:01 -0300
commit260a6901fd35a28a5ad0cb16373766bfc6ee30c4 (patch)
tree7e8050e71d824e2e807010d535528380f60b8694 /usr/local/www/wizards
parente75a787fcae4f94de0aa379d762c86d77835ffb0 (diff)
downloadpfsense-260a6901fd35a28a5ad0cb16373766bfc6ee30c4.zip
pfsense-260a6901fd35a28a5ad0cb16373766bfc6ee30c4.tar.gz
Strict checks for number of WANs and LANs on wizard
Diffstat (limited to 'usr/local/www/wizards')
-rw-r--r--usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc12
1 files changed, 8 insertions, 4 deletions
diff --git a/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc b/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
index a650e50..288a80d 100644
--- a/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
+++ b/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
@@ -86,24 +86,28 @@ function step2_stepbeforeformdisplay() {
global $config, $pkg;
global $stepid, $savemsg;
- $numberofinterfaces = 0;
+ $wans = 0;
+ $lans = 0;
$iflist = array();
$iflisttmp = get_configured_interface_with_descr();
foreach ($iflisttmp as $if => $ifdesc) {
if (!is_altq_capable(get_real_interface($if)))
continue;
- $numberofinterfaces++;
+ if (interface_has_gateway($if) || interface_has_gatewayv6($if))
+ $wans++;
+ else
+ $lans++;
$iflist[$if] = $ifdesc;
}
$numberofconnections = intval($config['ezshaper']['step1']['numberofconnections']);
- if ($numberofconnections > $numberofinterfaces) {
+ if ($numberofconnections > $wans) {
$savemsg=gettext("You have less interfaces than number of connections!");
$stepid--;
return;
}
$numberoflocalinterfaces = intval($config['ezshaper']['step1']['numberoflocalinterfaces']);
- if ($numberoflocalinterfaces > ($numberofinterfaces - $numberofconnections)) {
+ if ($numberoflocalinterfaces > $lans) {
$savemsg=gettext("You have less interfaces than number of connections!");
$stepid--;
return;
OpenPOWER on IntegriCloud