]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - html/cgi-bin/firewall.cgi
Firewall: fixed colors of target column when using standard networks
[people/teissler/ipfire-2.x.git] / html / cgi-bin / firewall.cgi
index ae7701fea7858456115d9f564e4886921f0a2fde..80989ce58662ddbca0950f79f26daba2e91b8a0a 100755 (executable)
@@ -1376,6 +1376,12 @@ sub getcolor
                }elsif ($val eq 'IPFire' ){
                        $tdcolor="style='background-color: $Header::colourred;color:white;'";
                        return;
+               }elsif ($val eq 'OpenVPN-Dyn' ){
+                       $tdcolor="style='background-color: $Header::colourovpn;color:white;'";
+                       return;
+               }elsif ($val eq 'IPsec RW' ){
+                       $tdcolor="style='background-color: $Header::colourvpn;color:white;'";
+                       return;
                }elsif($val =~ /^(.*?)\/(.*?)$/){
                        my ($sip,$scidr) = split ("/",$val);
                        if ( &General::IpInSubnet($sip,$netsettings{'ORANGE_ADDRESS'},$netsettings{'ORANGE_NETMASK'})){
@@ -1685,10 +1691,10 @@ END
                                                <td width='25%' align='right'>$Lang::tr{'dnat address'}:</td>
                                                <td width='30%'>
                                                        <select name='dnat' style='width: 100%;'>
-                                                               <option value='Default IP' $selected{'dnat'}{'Default IP'}>$Lang::tr{'default ip'}</option>
+                                                               <option value='Default IP' $selected{'dnat'}{'Default IP'}>$Lang::tr{'default ip'} ($netsettings{'RED_ADDRESS'})</option>
 END
                        foreach my $alias (sort keys %aliases) {
-                               print "<option value='$alias' $selected{'dnat'}{$alias}>$alias</option>";
+                               print "<option value='$alias' $selected{'dnat'}{$alias}>$alias ($aliases{$alias}{'IPT'})</option>";
                        }
 
                        print "</select>";
@@ -1717,7 +1723,7 @@ END
 END
 
                foreach my $alias (sort keys %aliases) {
-                       print "<option value='$alias' $selected{'snat'}{$alias}>$alias</option>";
+                       print "<option value='$alias' $selected{'snat'}{$alias}>$alias ($aliases{$alias}{'IPT'})</option>";
                }
 
                # XXX this is composed in a very ugly fashion
@@ -1725,10 +1731,11 @@ END
                        next if($defaultNetworks{$network}{'NAME'} eq "IPFire");
                        next if($defaultNetworks{$network}{'NAME'} eq "ALL");
                        next if($defaultNetworks{$network}{'NAME'} =~ /OpenVPN/i);
+                       next if($defaultNetworks{$network}{'NAME'} =~ /IPsec/i);
 
                        print "<option value='$defaultNetworks{$network}{'NAME'}'";
                        print " selected='selected'" if ($fwdfwsettings{$fwdfwsettings{'nat'}} eq $defaultNetworks{$network}{'NAME'});
-                       print ">$network</option>";
+                       print ">$network ($defaultNetworks{$network}{'NET'})</option>";
                }
 
                print <<END;
@@ -2354,7 +2361,7 @@ sub validremark
        if ($remark !~ /^[a-zäöüA-ZÖÄÜ0-9-.:;\|_()\/\s]*$/) {
                return 0;}
        # First character can only be a letter or a digit
-       if (substr ($remark, 0, 1) !~ /^[a-zäöüA-ZÖÄÜ0-9]*$/) {
+       if (substr ($remark, 0, 1) !~ /^[a-zäöüA-ZÖÄÜ0-9(]*$/) {
                return 0;}
        # Last character can only be a letter or a digit
        if (substr ($remark, -1, 1) !~ /^[a-zöäüA-ZÖÄÜ0-9.:;_)]*$/) {
@@ -2599,7 +2606,7 @@ END
                        if ($$hash{$key}[5] eq 'std_net_tgt' || $$hash{$key}[5] eq 'ipfire'  || $$hash{$key}[6] eq 'RED1' || $$hash{$key}[6] eq 'GREEN' || $$hash{$key}[6] eq 'ORANGE' || $$hash{$key}[6] eq 'BLUE' ){
                                if ($$hash{$key}[6] eq 'RED1'){
                                        print "$ipfireiface $Lang::tr{'red1'}";
-                               }elsif ($$hash{$key}[6] eq 'GREEN' || $$hash{$key}[6] eq 'ORANGE' || $$hash{$key}[6] eq 'BLUE'|| $$hash{$key}[6] eq 'ALL')
+                               }elsif ($$hash{$key}[6] eq 'GREEN' || $$hash{$key}[6] eq 'ORANGE' || $$hash{$key}[6] eq 'BLUE'|| $$hash{$key}[6] eq 'ALL' || $$hash{$key}[6] eq 'RED')
                                {
                                        print "$ipfireiface ".&get_name($$hash{$key}[6]);
                                }else{