]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
Forward FIrewall: Bugfix: When using predefined services in rulecreation, the rule...
authorAlexander Marx <amarx@ipfire.org>
Thu, 25 Jul 2013 05:33:20 +0000 (07:33 +0200)
committerAlexander Marx <amarx@ipfire.org>
Thu, 8 Aug 2013 05:52:06 +0000 (07:52 +0200)
config/forwardfw/rules.pl
html/cgi-bin/forwardfw.cgi

index 6a91ddf5725c094da1da3dbb89f75eb476166ba5..9f23c54e0a5b0fc47472919b9d2d34726f5fdbea 100755 (executable)
@@ -575,7 +575,7 @@ sub get_port
                                                return "--dport $$hash{$key}[15] ";
                                         }else{
                                                 $$hash{$key}[15] =~ s/\:/-/g;
-                                               return ":$$hash{$key}[15]";
+                                                return ":$$hash{$key}[15]";
                                         }
                                }
                        }elsif($$hash{$key}[13] ne '' && $$hash{$key}[13] ne 'All ICMP-Types'){
@@ -585,7 +585,7 @@ sub get_port
                        }
                }elsif($$hash{$key}[14] eq 'cust_srv'){
                        if ($prot ne 'ICMP'){
-                               if($$hash{$key}[31] eq 'dnat'){
+                               if($$hash{$key}[31] eq 'dnat' && $$hash{$key}[28] eq 'ON'){
                                        return ":".&fwlib::get_srv_port($$hash{$key}[15],1,$prot);
                                }else{
                                        return "--dport ".&fwlib::get_srv_port($$hash{$key}[15],1,$prot);
index f516e8d10ba7674e1e9bbe7948506e2f1c9fa1d0..61d02b7602b402578b3fdd139bb3a7f1a860518b 100755 (executable)
@@ -378,7 +378,7 @@ if ($fwdfwsettings{'ACTION'} eq 'copyrule')
        $fwdfwsettings{'copyfwrule'}='on';
        &newrule;
 }
-if ($fwdfwsettings{'ACTION'} eq '')
+if ($fwdfwsettings{'ACTION'} eq '' or $fwdfwsettings{'ACTION'} eq 'reset')
 {
        &base;
 }
@@ -2393,7 +2393,6 @@ END
                                print"<tr><td $col width='20%' align='center'><font color='#FFFFFF'>$Lang::tr{'fwdfw final_rule'}</td><td $col align='center'><font color='#FFFFFF' >$Lang::tr{'fwdfw pol allow'}</font></td></tr>";
                        }
                }else{
-                       print"uzlputz daneben";
                        print"<tr><td bgcolor='darkred' width='20%' align='center'><font color='#FFFFFF'>$Lang::tr{'fwdfw final_rule'}</td><td bgcolor='darkred' align='center'><font color='#FFFFFF'>$Lang::tr{'fwdfw pol block'}</font></td></tr>";
                }
                print"</table>";