IPSEC: added checkroutine for used OpenVPN subnets/Hosts

This commit is contained in:
Alexander Marx
2012-11-26 13:19:07 +01:00
parent d46bec5299
commit f7fc17c38a

8
html/cgi-bin/vpnmain.cgi Normal file → Executable file
View File

@@ -1415,6 +1415,14 @@ END
goto VPNCONF_ERROR;
}
if ($cgiparams{'TYPE'} eq 'net'){
$errormessage=&General::checksubnets($cgiparams{'NAME'},$cgiparams{'REMOTE_SUBNET'});
if ($errormessage ne ''){
goto VPNCONF_ERROR;
}
}
if ($cgiparams{'AUTH'} eq 'psk') {
if (! length($cgiparams{'PSK'}) ) {
$errormessage = $Lang::tr{'pre-shared key is too short'};