IPSEC: added checkroutine for used OpenVPN subnets/Hosts
authorAlexander Marx <amarx@ipfire.org>
Mon, 26 Nov 2012 12:19:07 +0000 (13:19 +0100)
committerAlexander Marx <amarx@ipfire.org>
Mon, 26 Nov 2012 12:19:07 +0000 (13:19 +0100)
html/cgi-bin/vpnmain.cgi [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 0fb7c93..24aeb6d
@@ -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'};