summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces_opt.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-08-14 17:46:26 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-08-14 17:46:26 +0000
commit92b17aeda55876f65318c7067aebbb4663fb01fa (patch)
tree320e8797a3ba397eef2d1bd32040321c0565686d /usr/local/www/interfaces_opt.php
parent32e93ba40657c69d79190276b53739a6249d1bcf (diff)
downloadpfsense-92b17aeda55876f65318c7067aebbb4663fb01fa.zip
pfsense-92b17aeda55876f65318c7067aebbb4663fb01fa.tar.gz
Make sure gateway is a valid ip address
Ticket #348
Diffstat (limited to 'usr/local/www/interfaces_opt.php')
-rwxr-xr-xusr/local/www/interfaces_opt.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr/local/www/interfaces_opt.php b/usr/local/www/interfaces_opt.php
index e9ee4d0..0189fa4 100755
--- a/usr/local/www/interfaces_opt.php
+++ b/usr/local/www/interfaces_opt.php
@@ -135,6 +135,10 @@ if ($_POST) {
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))) {
$input_errors[] = "The MTU must be between 576 and 1500 bytes.";
OpenPOWER on IntegriCloud