summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces_lan.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/interfaces_lan.php')
-rwxr-xr-xusr/local/www/interfaces_lan.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr/local/www/interfaces_lan.php b/usr/local/www/interfaces_lan.php
index ec510c7..35b43b5 100755
--- a/usr/local/www/interfaces_lan.php
+++ b/usr/local/www/interfaces_lan.php
@@ -81,8 +81,13 @@ if ($_POST) {
touch($d_sysrebootreqd_path);
}
- update_if_changed("bandwidth", &$lancfg['bandwidth'], $_POST['bandwidth']);
- update_if_changed("bandwidth type", &$lancfg['bandwidthtype'], $_POST['bandwidthtype']);
+ if($_POST['bandwidth'] <> "" and $_POST['bandwidthtype'] <> "") {
+ update_if_changed("bandwidth", &$lancfg['bandwidth'], $_POST['bandwidth']);
+ update_if_changed("bandwidth type", &$lancfg['bandwidthtype'], $_POST['bandwidthtype']);
+ } else {
+ unset($lancfg['bandwidth']);
+ unset($lancfg['bandwidthtype']);
+ }
$dhcpd_was_enabled = 0;
if (isset($config['dhcpd']['enable'])) {
OpenPOWER on IntegriCloud