diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-08-14 17:46:26 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-08-14 17:46:26 +0000 |
commit | 92b17aeda55876f65318c7067aebbb4663fb01fa (patch) | |
tree | 320e8797a3ba397eef2d1bd32040321c0565686d | |
parent | 32e93ba40657c69d79190276b53739a6249d1bcf (diff) | |
download | pfsense-92b17aeda55876f65318c7067aebbb4663fb01fa.zip pfsense-92b17aeda55876f65318c7067aebbb4663fb01fa.tar.gz |
Make sure gateway is a valid ip address
Ticket #348
-rwxr-xr-x | usr/local/www/interfaces_opt.php | 4 |
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."; |