summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces_opt.php
diff options
context:
space:
mode:
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