diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-05-10 15:56:29 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-05-10 15:56:29 +0000 |
commit | 7528fc099038735a79a64e9fc32af12b3c98b114 (patch) | |
tree | 8fdfce8205604fd63b521adac9de649e22d3ad01 /etc/inc | |
parent | 127bd0ce8e01f031e761ab168e6a7e7887d98c7a (diff) | |
download | pfsense-7528fc099038735a79a64e9fc32af12b3c98b114.zip pfsense-7528fc099038735a79a64e9fc32af12b3c98b114.tar.gz |
Patch from Martin to fix http://forum.pfsense.org/index.php/topic,4773.0.html
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/openvpn.inc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc index a388335..7205019 100644 --- a/etc/inc/openvpn.inc +++ b/etc/inc/openvpn.inc @@ -89,22 +89,26 @@ function openvpn_validate_input($mode, $post, $input_errors) { $input_errors[] = $result; // DHCP-Options logic-check + if (!empty($post['dhcp_dns'])) { $servers = explode(';', $post['dhcp_dns']); foreach ($servers as $server) if (!is_ipaddr($server)) {$input_errors[] = 'The field \'DHCP-Opt.: DNS-Server\' must contain a valid IP address and no whitespaces.'; - break;} + break;}} + if (!empty($post['dhcp_wins'])) { $servers = explode(';', $post['dhcp_wins']); foreach ($servers as $server) if (!is_ipaddr($server)) {$input_errors[] = 'The field \'DHCP-Opt.: WINS-Server\' must contain a valid IP address and no whitespaces.'; - break;} + break;}} + if (!empty($post['dhcp_nbdd'])) { $servers = explode(';', $post['dhcp_nbdd']); foreach ($servers as $server) if (!is_ipaddr($server)) {$input_errors[] = 'The field \'DHCP-Opt.: NBDD-Server\' must contain a valid IP address and no whitespaces.'; - break;} + break;}} + if (!empty($post['dhcp_ntp'])) { $servers = explode(';', $post['dhcp_ntp']); foreach ($servers as $server) if (!is_ipaddr($server)) {$input_errors[] = 'The field \'DHCP-Opt.: NTP-Server\' must contain a valid IP address and no whitespaces.'; - break;} + break;}} } |