]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - html/cgi-bin/ovpnmain.cgi
Forward Firewall: added GPL header to all files
[people/teissler/ipfire-2.x.git] / html / cgi-bin / ovpnmain.cgi
index fb3cb622fa63ba55a6fd25f3c8d852f14746ff87..899bf3efa2b5bc34b12aadf9c810057d1e0b3c9b 100644 (file)
@@ -30,6 +30,7 @@ use File::Copy;
 use File::Temp qw/ tempfile tempdir /;
 use strict;
 use Archive::Zip qw(:ERROR_CODES :CONSTANTS);
+use Sort::Naturally;
 require '/var/ipfire/general-functions.pl';
 require "${General::swroot}/lang.pl";
 require "${General::swroot}/header.pl";
@@ -169,14 +170,12 @@ sub checkportfw {
        my $DPORT = shift;
        my $DPROT = shift;
        my %natconfig =();
-       my $confignat = "${General::swroot}/forward/nat";
+       my $confignat = "${General::swroot}/forward/config";
        $DPROT= uc ($DPROT);
        &General::readhasharray($confignat, \%natconfig);
        foreach my $key (sort keys %natconfig){
-               $errormessage .= "uzlputz: $natconfig{$key}[30] und $natconfig{$key}[12]<br>";
                my @portarray = split (/\|/,$natconfig{$key}[30]);
                foreach my $value (@portarray){
-                       $errormessage .= "uzlputz -split portaray: $value<br>";
                        if ($value =~ /:/i){
                                my ($a,$b) = split (":",$value);
                                if ($DPROT eq $natconfig{$key}[12] && $DPORT gt $a && $DPORT lt $b){
@@ -4852,11 +4851,10 @@ END
 </tr>
 END
        ;
-        my $id = 0;
-        my $gif;
-        foreach my $key (sort { uc($confighash{$a}[1]) cmp uc($confighash{$b}[1]) } keys %confighash) {
-       if ($confighash{$key}[0] eq 'on') { $gif = 'on.gif'; } else { $gif = 'off.gif'; }
-
+    my $id = 0;
+    my $gif;
+    foreach my $key (sort { ncmp ($confighash{$a}[1],$confighash{$b}[1]) } keys %confighash) {
+       if ($confighash{$key}[0] eq 'on') { $gif = 'on.gif'; } else { $gif = 'off.gif'; }
        if ($id % 2) {
            print "<tr bgcolor='$color{'color20'}'>\n";
        } else {