X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fovpnmain.cgi;h=c315e9e5eb04f5eae1c48bce25328e78c831f2ec;hp=8858974a04b28bbc5587b8d0cad2ab82d0c69329;hb=4d81e0f3812fc272b2515a631a2e98c4ae76a42b;hpb=808465682327a3e8d3dd8e6a3ae247d36751041f diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index 8858974a0..c315e9e5e 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -2159,7 +2159,7 @@ if ($confighash{$cgiparams{'KEY'}}[3] eq 'net') { } else { $errormessage = $Lang::tr{'invalid key'}; } - + &General::firewall_reload(); ### ### Download PKCS12 file @@ -2282,7 +2282,7 @@ ADV_ERROR: &Header::openbox('100%', 'LEFT', $Lang::tr{'advanced server'}); print < - +
@@ -2350,12 +2350,12 @@ print < - + - + @@ -2485,10 +2485,10 @@ if ($cgiparams{'ACTION'} eq "edit"){ &Header::openbox('100%', 'LEFT', $Lang::tr{'ccd modify'}); print < +
$Lang::tr{'dhcp-options'}
fragment
Default: 1300$Lang::tr{'openvpn default'}: 1300
mssfix Default: on$Lang::tr{'openvpn default'}: on
- + @@ -2548,7 +2548,7 @@ END print" + END ; } @@ -2787,7 +2787,7 @@ if ( -s "${General::swroot}/ovpn/settings") { - + @@ -3509,8 +3509,13 @@ if ($cgiparams{'TYPE'} eq 'net') { unlink ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}/$cgiparams{'NAME'}.conf") or die "Removing Configfile fail: $!"; rmdir ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}") || die "Removing Directory fail: $!"; goto VPNCONF_ERROR; - } - + } + #Check if remote subnet is used elsewhere + my ($n2nip,$n2nsub)=split("/",$cgiparams{'REMOTE_SUBNET'}); + $warnmessage=&General::checksubnets('',$n2nip,'ovpn'); + if ($warnmessage){ + $warnmessage=$Lang::tr{'remote subnet'}." ($cgiparams{'REMOTE_SUBNET'})
".$warnmessage; + } } # if (($cgiparams{'TYPE'} eq 'net') && ($cgiparams{'SIDE'} !~ /^(left|right)$/)) { @@ -4322,7 +4327,7 @@ if ($cgiparams{'TYPE'} eq 'host') { - + @@ -4569,6 +4574,16 @@ END &Header::closebox(); } + if ($warnmessage) { + &Header::openbox('100%', 'LEFT', $Lang::tr{'warning messages'}); + print "$warnmessage
"; + print "$Lang::tr{'fwdfw warn1'}
"; + &Header::closebox(); + print"
"; + &Header::closepage(); + exit 0; + } + my $sactive = "
$Lang::tr{'ccd name'}:$Lang::tr{'ccd subnet'}:
$Lang::tr{'ccd subnet'}:

$ccdconf[0]$ccdconf[1]$ccdhosts/".(&ccdmaxclients($ccdconf[1])+1).""; print < - + @@ -2557,7 +2557,7 @@ print < -
$Lang::tr{'net to net vpn'} (Upload Client Package)
 
 Import Connection Name
 Default : Client Packagename
 $Lang::tr{'openvpn default'}: Client Packagename

* $Lang::tr{'this field may be blank'}
  $Lang::tr{'pkcs12 file password'}:
 $Lang::tr{'pkcs12 file password'}:
($Lang::tr{'confirmation'})
 $Lang::tr{'pkcs12 file password'}:
($Lang::tr{'confirmation'})
 

$Lang::tr{'stopped'}
"; my $srunning = "no"; my $activeonrun = ""; @@ -4581,7 +4596,7 @@ END } &Header::openbox('100%', 'LEFT', $Lang::tr{'global settings'}); print < + @@ -4613,7 +4628,7 @@ END - +
   $Lang::tr{'destination port'}:
$Lang::tr{'MTU'} 
$Lang::tr{'comp-lzo'} $Lang::tr{'cipher'}