]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Forward Firewall: Bugfix of last commit. Added "Interface" to source or target that...
authorAlexander Marx <amarx@ipfire.org>
Tue, 2 Jul 2013 06:21:38 +0000 (08:21 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 9 Aug 2013 12:15:31 +0000 (14:15 +0200)
html/cgi-bin/forwardfw.cgi
langs/en/cgi-bin/en.pl

index fb577439c5ffd5f29a40e217dc22f0c3f372b4fc..9bd4606f9d316a8761f994e8a857743af8a1502a 100755 (executable)
@@ -134,7 +134,7 @@ if ($fwdfwsettings{'ACTION'} eq 'saverule')
        }
        #check if we try to break rules
        if(     $fwdfwsettings{'grp1'} eq 'ipfire_src' && $fwdfwsettings{'grp2'} eq 'ipfire'){
        }
        #check if we try to break rules
        if(     $fwdfwsettings{'grp1'} eq 'ipfire_src' && $fwdfwsettings{'grp2'} eq 'ipfire'){
-               $errormessage.=$Lang::tr{'fwdfw err same'};
+               $errormessage=$Lang::tr{'fwdfw err same'};
        }
        #INPUT part
        if($fwdfwsettings{'grp2'} eq 'ipfire' && $fwdfwsettings{$fwdfwsettings{'grp1'}} ne 'ORANGE'){
        }
        #INPUT part
        if($fwdfwsettings{'grp2'} eq 'ipfire' && $fwdfwsettings{$fwdfwsettings{'grp1'}} ne 'ORANGE'){
@@ -772,7 +772,7 @@ sub checkrule
        }
        #check if source and target identical
        if ($fwdfwsettings{$fwdfwsettings{'grp1'}} eq $fwdfwsettings{$fwdfwsettings{'grp2'}} && $fwdfwsettings{$fwdfwsettings{'grp1'}} ne 'ALL'){
        }
        #check if source and target identical
        if ($fwdfwsettings{$fwdfwsettings{'grp1'}} eq $fwdfwsettings{$fwdfwsettings{'grp2'}} && $fwdfwsettings{$fwdfwsettings{'grp1'}} ne 'ALL'){
-               $errormessage.=$Lang::tr{'fwdfw err same'};
+               $errormessage=$Lang::tr{'fwdfw err same'};
                return $errormessage;
        }
        #get source and targetip address if possible
                return $errormessage;
        }
        #get source and targetip address if possible
@@ -2267,11 +2267,13 @@ END
                                $ipfireiface='Interface';
                        }
                        if ($$hash{$key}[5] eq 'std_net_tgt' || $$hash{$key}[5] eq 'ipfire' && $$hash{$key}[6] eq 'RED' || $$hash{$key}[6] eq 'RED1' || $$hash{$key}[6] eq 'GREEN' || $$hash{$key}[6] eq 'ORANGE' || $$hash{$key}[6] eq 'BLUE' ){
                                $ipfireiface='Interface';
                        }
                        if ($$hash{$key}[5] eq 'std_net_tgt' || $$hash{$key}[5] eq 'ipfire' && $$hash{$key}[6] eq 'RED' || $$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')
-                               {
+                               if ($$hash{$key}[6] eq 'RED1'){
                                        print "$ipfireiface $Lang::tr{'red1'}";
                                        print "$ipfireiface $Lang::tr{'red1'}";
+                               }elsif ($$hash{$key}[6] ne 'RED')
+                               {
+                                       print "$ipfireiface $$hash{$key}[6]";
                                }else{
                                }else{
-                                       print &get_name($$hash{$key}[6]);
+                                       print "$$hash{$key}[6]";
                                }
                        }elsif ($$hash{$key}[5] eq 'tgt_addr'){
                                my ($split1,$split2) = split("/",$$hash{$key}[6]);
                                }
                        }elsif ($$hash{$key}[5] eq 'tgt_addr'){
                                my ($split1,$split2) = split("/",$$hash{$key}[6]);
@@ -2281,7 +2283,7 @@ END
                                        print $$hash{$key}[6];
                                }
                        }else{
                                        print $$hash{$key}[6];
                                }
                        }else{
-                               print "$ipfireiface $$hash{$key}[6]";
+                               print "$$hash{$key}[6]";
                        }
                        $tdcolor='';
                        #TARGETPORT
                        }
                        $tdcolor='';
                        #TARGETPORT
index 561ba7e858d9991e441fb2ed4c6c966bbd8d7c07..da3ec2bed4787c7f2d01b434d8e5a220de76a364 100644 (file)
 'fwdfw wd_fri'                 => 'Fri',
 'fwdfw wd_sat'                 => 'Sat',
 'fwdfw wd_sun'                 => 'Sun',
 'fwdfw wd_fri'                 => 'Fri',
 'fwdfw wd_sat'                 => 'Sat',
 'fwdfw wd_sun'                 => 'Sun',
-'fwdfw xt access'              => 'Access to firewall',
+'fwdfw xt access'              => 'Input',
 'fwhost addgrp'                => 'Add Network / Host Group:',
 'fwhost addgrpname'            => 'Groupname:',
 'fwhost addhost'               => 'Add Host:',
 'fwhost addgrp'                => 'Add Network / Host Group:',
 'fwhost addgrpname'            => 'Groupname:',
 'fwhost addhost'               => 'Add Host:',