]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - html/cgi-bin/firewall.cgi
Firewall: BUGFIX 10507
[people/teissler/ipfire-2.x.git] / html / cgi-bin / firewall.cgi
index d69d8217f2818241f641d311d76d4573b7c7b9d1..b7639a27ff6f7390d5319fff5125fda2047c21dc 100644 (file)
@@ -584,8 +584,10 @@ sub checktarget
                                }
                        }
                }else{
-                       $errormessage=$Lang::tr{'fwdfw dnat error'}."<br>";
-                       return $errormessage;
+                       if ($fwdfwsettings{'grp2'} ne 'ipfire'){
+                               $errormessage=$Lang::tr{'fwdfw dnat error'}."<br>";
+                               return $errormessage;
+                       }
                }
        }
        if ($fwdfwsettings{'tgt_addr'} eq $fwdfwsettings{$fwdfwsettings{'grp2'}} && $fwdfwsettings{'tgt_addr'} ne ''){
@@ -1399,11 +1401,13 @@ sub getcolor
                        }
                        #Check if IP is part of a IPsec N2N network
                        foreach my $key (sort keys %ipsecconf){
-                               my ($a,$b) = split("/",$ipsecconf{$key}[11]);
-                               $b=&General::iporsubtodec($b);
-                               if (&General::IpInSubnet($c,$a,$b)){
-                                       $tdcolor="style='background-color: $Header::colourvpn;color:white;'";
-                                       return;
+                               if ($ipsecconf{$key}[11]){
+                                       my ($a,$b) = split("/",$ipsecconf{$key}[11]);
+                                       $b=&General::iporsubtodec($b);
+                                       if (&General::IpInSubnet($c,$a,$b)){
+                                               $tdcolor="style='background-color: $Header::colourvpn;color:white;'";
+                                               return;
+                                       }
                                }
                        }
                }
@@ -2564,8 +2568,7 @@ END
                                        my @src_addresses=&fwlib::get_addresses(\%$hash,$key,'src');
                                        my @nat_ifaces;
                                        foreach my $val (@src_addresses){
-                                               my ($ip,$sub)=split("/",$val);
-                                               push (@nat_ifaces,&fwlib::get_nat_address($$hash{$key}[29],$ip));
+                                               push (@nat_ifaces,&fwlib::get_nat_address($$hash{$key}[29],$val));
                                        }
                                        @nat_ifaces=&del_double(@nat_ifaces);
                                        $natstring = join(', ', @nat_ifaces);