diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-05-10 15:56:35 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-05-10 15:56:35 +0000 |
commit | f9fc5c715663ff500e4f7aba6757a097b6877b36 (patch) | |
tree | 7ba3421e596a0f0792016f9429eb7fbd9fc770fd /etc/inc/openvpn.inc | |
parent | d16448ea04fc2d2f6f53ceb252cea6d0c1245af7 (diff) | |
download | pfsense-f9fc5c715663ff500e4f7aba6757a097b6877b36.zip pfsense-f9fc5c715663ff500e4f7aba6757a097b6877b36.tar.gz |
Patch from Martin to fix http://forum.pfsense.org/index.php/topic,4773.0.html
Diffstat (limited to 'etc/inc/openvpn.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 921aa47..bd2446a 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;}} } |