summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces_opt.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-05-25 21:57:44 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-05-25 21:57:44 +0000
commit001fdeea72bf513b38cf3b03bc79c47ba1699f0a (patch)
tree0416bdc2f2b6e6287518cd43c6dac1613ac005dc /usr/local/www/interfaces_opt.php
parent224ed6e22283c50ab1be0ab0be04d81316a88af9 (diff)
downloadpfsense-001fdeea72bf513b38cf3b03bc79c47ba1699f0a.zip
pfsense-001fdeea72bf513b38cf3b03bc79c47ba1699f0a.tar.gz
* Do not set bandwidth and bandwidth type unless are other than ""
* Unset the values if either condition is not met in the config
Diffstat (limited to 'usr/local/www/interfaces_opt.php')
-rwxr-xr-xusr/local/www/interfaces_opt.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr/local/www/interfaces_opt.php b/usr/local/www/interfaces_opt.php
index 9c4e56b..7e9ce75 100755
--- a/usr/local/www/interfaces_opt.php
+++ b/usr/local/www/interfaces_opt.php
@@ -128,8 +128,13 @@ if ($_POST) {
$optcfg['subnet'] = $_POST['subnet'];
$optcfg['bridge'] = $_POST['bridge'];
$optcfg['enable'] = $_POST['enable'] ? true : false;
- $optcfg['bandwidth'] = $_POST['bandwidth'];
- $optcfg['bandwidthtype'] = $_POST['bandwidthtype'];
+ if($_POST['bandwidth'] <> "" and $_POST['bandwidthtype'] <> "") {
+ $optcfg['bandwidth'] = $_POST['bandwidth'];
+ $optcfg['bandwidthtype'] = $_POST['bandwidthtype'];
+ } else {
+ unset($optcfg['bandwidth']);
+ unset($optcfg['bandwidthtype']);
+ }
$optcfg['gateway'] = $_POST['gateway'];
write_config();
OpenPOWER on IntegriCloud