]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Forward Firewall: fixed converter bug: Remark is "0" and Alias ip is taken as ip...
authorAlexander Marx <amarx@ipfire.org>
Thu, 21 Mar 2013 06:34:05 +0000 (07:34 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 9 Aug 2013 12:11:57 +0000 (14:11 +0200)
config/forwardfw/convert-portfw

index 682199f0046746c6425b3a620be0ac48058a189d..8ec3c34382dda3d782300e649d46ea51b0490fdd 100755 (executable)
@@ -85,14 +85,15 @@ sub build_rules
                }else{
                        foreach my $ali (@alias){
                                my ($alias_ip,$alias_active,$alias_name) = split (",",$ali);
-                               if($alias eq $alias_name){
+                               if($alias eq $alias_ip){
+                                       chomp($alias_name);
                                        $alias=$alias_name;
                                }
                        }
                }
                $active = uc $active;
                $prot   = uc $prot;
-               $remark = chomp($remark);
+               chomp($remark);
                push (@built_rules,"ACCEPT,NAT_DESTINATION,$active,$src,$src1,tgt_addr,$target/32,ON,$prot,,TGT_PORT,$targetport,$remark,00:00,00:00,ON,$alias,$ipfireport,dnat");
                my $now=localtime;
                print LOG "$now    Converted-> KEY: $count ACCEPT,NAT_DESTINATION,$active,$src,$src1,tgt_addr,$target/32,ON,$prot,,TGT_PORT,$targetport,$remark,00:00,00:00,ON,$alias,$ipfireport,dnat\n";