From 7f5b482497977fb2cde2f12b37a0268698073567 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 14 Nov 2004 21:00:49 +0000 Subject: Clean up save or reboot message, add bandwidth elements to WAN and LAN for traffic shaping. Clean up a few bugs in traffic shaping queue edit screen. --- usr/local/www/interfaces_lan.php | 65 ++++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 25 deletions(-) (limited to 'usr/local/www/interfaces_lan.php') diff --git a/usr/local/www/interfaces_lan.php b/usr/local/www/interfaces_lan.php index 66af153..e4b2d65 100755 --- a/usr/local/www/interfaces_lan.php +++ b/usr/local/www/interfaces_lan.php @@ -1,22 +1,22 @@ #!/usr/local/bin/php -. All rights reserved. - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE @@ -50,16 +50,16 @@ if ($_POST) { /* input validation */ $reqdfields = explode(" ", "ipaddr subnet"); $reqdfieldsn = explode(",", "IP address,Subnet bit count"); - + do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); - + if (($_POST['ipaddr'] && !is_ipaddr($_POST['ipaddr']))) { $input_errors[] = "A valid IP address must be specified."; } if (($_POST['subnet'] && !is_numeric($_POST['subnet']))) { $input_errors[] = "A valid subnet bit count must be specified."; } - + /* Wireless interface? */ if (isset($optcfg['wireless'])) { $wi_input_errors = wireless_config_post(); @@ -71,18 +71,20 @@ if ($_POST) { if (!$input_errors) { $config['interfaces']['lan']['ipaddr'] = $_POST['ipaddr']; $config['interfaces']['lan']['subnet'] = $_POST['subnet']; - + $config['interfaces']['lan']['bandwidth'] = $_POST['bandwidth']; + $config['interfaces']['lan']['bandwidthtype'] = $_POST['bandwidthtype']; + $dhcpd_was_enabled = 0; if (isset($config['dhcpd']['enable'])) { unset($config['dhcpd']['enable']); $dhcpd_was_enabled = 1; } - + write_config(); touch($d_sysrebootreqd_path); - + $savemsg = get_std_save_message(0); - + if ($dhcpd_was_enabled) $savemsg .= "
Note that the DHCP server has been disabled.
Please review its configuration " . "and enable it again prior to rebooting."; @@ -104,7 +106,7 @@ function gen_bits(ipaddr) { return ""; if (adr[0] == 0 && adr[1] == 0 && adr[2] == 0 && adr[3] == 0) return ""; - + if (adr[0] <= 127) return "8"; else if (adr[0] <= 191) @@ -129,11 +131,11 @@ function ipaddr_change() {
- + - + + + + + - - +
IP address + - / + /
Interface Bandwidth Speed + +
The bandwidth setting will define the speed of the interface for traffic shaping. +
  - + +
  Warning:
-
after you click "Save", you must - reboot your firewall for changes to take effect. You may also - have to do one or more of the following steps before you can - access your firewall again: +
after you click "Save", you must + reboot your firewall for changes to take effect. You may also + have to do one or more of the following steps before you can + access your firewall again:
  • change the IP address of your computer
  • renew its DHCP lease
  • -- cgit v1.1