Revision f9fc5c71
Added by Scott Ullrich about 18 years ago
etc/inc/openvpn.inc | ||
---|---|---|
89 | 89 |
$input_errors[] = $result; |
90 | 90 |
|
91 | 91 |
// DHCP-Options logic-check |
92 |
if (!empty($post['dhcp_dns'])) { |
|
92 | 93 |
$servers = explode(';', $post['dhcp_dns']); |
93 | 94 |
foreach ($servers as $server) if (!is_ipaddr($server)) |
94 | 95 |
{$input_errors[] = 'The field \'DHCP-Opt.: DNS-Server\' must contain a valid IP address and no whitespaces.'; |
95 |
break;} |
|
96 |
break;}} |
|
97 |
if (!empty($post['dhcp_wins'])) { |
|
96 | 98 |
$servers = explode(';', $post['dhcp_wins']); |
97 | 99 |
foreach ($servers as $server) if (!is_ipaddr($server)) |
98 | 100 |
{$input_errors[] = 'The field \'DHCP-Opt.: WINS-Server\' must contain a valid IP address and no whitespaces.'; |
99 |
break;} |
|
101 |
break;}} |
|
102 |
if (!empty($post['dhcp_nbdd'])) { |
|
100 | 103 |
$servers = explode(';', $post['dhcp_nbdd']); |
101 | 104 |
foreach ($servers as $server) if (!is_ipaddr($server)) |
102 | 105 |
{$input_errors[] = 'The field \'DHCP-Opt.: NBDD-Server\' must contain a valid IP address and no whitespaces.'; |
103 |
break;} |
|
106 |
break;}} |
|
107 |
if (!empty($post['dhcp_ntp'])) { |
|
104 | 108 |
$servers = explode(';', $post['dhcp_ntp']); |
105 | 109 |
foreach ($servers as $server) if (!is_ipaddr($server)) |
106 | 110 |
{$input_errors[] = 'The field \'DHCP-Opt.: NTP-Server\' must contain a valid IP address and no whitespaces.'; |
107 |
break;}
|
|
111 |
break;}}
|
|
108 | 112 |
|
109 | 113 |
} |
110 | 114 |
|
Also available in: Unified diff
Patch from Martin to fix http://forum.pfsense.org/index.php/topic,4773.0.html