openvpn ccd: Minor fixes.

some bugfixes, client advanced options no more visible under net-2-net config, blue network is recognized,
Fixed the bug with wrong ip address in ccd file.
This commit is contained in:
Alexander Marx
2012-11-20 16:23:01 +01:00
committed by Michael Tremer
parent a66e24bbfd
commit e81be1e1ed
3 changed files with 50 additions and 30 deletions

View File

@@ -27,7 +27,7 @@ open(FILE,"/var/ipfire/ovpn/server.conf");
&General::readhasharray("/var/ipfire/ovpn/ovpnconfig", \%ovpnconfig);
foreach my $key (keys %ovpnconfig){
if($ovpnconfig{$key}[32] eq ''){
if($ovpnconfig{$key}[32] eq '' && $ovpnconfig{$key}[3] eq 'host'){
open ( CCDRWCONF,'>',"/var/ipfire/ovpn/ccd/$ovpnconfig{$key}[2]") or die "Unable to create clientconfigfile $!";
print CCDRWCONF "# OpenVPN Clientconfig from CCD extension by Copymaster#\n\n";
print CCDRWCONF "#This client uses the dynamic pool\n\n";