summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-08-14 22:28:56 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-08-14 22:28:56 +0000
commite4065f5b59fab45f0d6aa230bd7f0c8d1deb96a8 (patch)
tree7f134c021f9c9a5782278414cba2aaf6b559d24b /usr/local
parent4ff29a45795c074a98a3875ac7062b754458ec4d (diff)
downloadpfsense-e4065f5b59fab45f0d6aa230bd7f0c8d1deb96a8.zip
pfsense-e4065f5b59fab45f0d6aa230bd7f0c8d1deb96a8.tar.gz
Do not validate IP, subnet or gateway for DHCP enabled interface.
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/interfaces_opt.php27
1 files changed, 13 insertions, 14 deletions
diff --git a/usr/local/www/interfaces_opt.php b/usr/local/www/interfaces_opt.php
index f4d362e..a6c6a48 100755
--- a/usr/local/www/interfaces_opt.php
+++ b/usr/local/www/interfaces_opt.php
@@ -124,20 +124,19 @@ if ($_POST) {
$input_errors[] = "Interfaces cannot be bridged while the captive portal is enabled.";
}
} else {
- $reqdfields = explode(" ", "descr ipaddr subnet");
- $reqdfieldsn = explode(",", "Description,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.";
- }
-
- if($_POST['gateway'] <> "" && !is_ipaddr($_POST['gateway'])) {
- $input_errors[] = "A valid gateway must be specified.";
+ if ($_POST['type'] <> "DHCP") {
+ $reqdfields = explode(" ", "descr ipaddr subnet");
+ $reqdfieldsn = explode(",", "Description,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.";
+ }
+ if($_POST['gateway'] <> "" && !is_ipaddr($_POST['gateway'])) {
+ $input_errors[] = "A valid gateway must be specified.";
+ }
}
}
if ($_POST['mtu'] && (($_POST['mtu'] < 576) || ($_POST['mtu'] > 1500))) {
OpenPOWER on IntegriCloud