diff options
-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."; |