X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Ffirewall.cgi;h=d69d8217f2818241f641d311d76d4573b7c7b9d1;hp=436bdafd069226e1dfb571c62c431636652bb5de;hb=fd169d0adc87c82253b0655d94ea8213e9aaabe4;hpb=4e54e3c6f531f356424c366c6c886efeceb5b8ae diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi index 436bdafd0..d69d8217f 100644 --- a/html/cgi-bin/firewall.cgi +++ b/html/cgi-bin/firewall.cgi @@ -989,6 +989,12 @@ sub deleterule &base; } } +sub del_double +{ + my %all=(); + @all{@_}=1; + return (keys %all); +} sub disable_rule { my $key1=shift; @@ -2551,9 +2557,22 @@ END END #Is this a DNAT rule? + my $natstring; if ($$hash{$key}[31] eq 'dnat' && $$hash{$key}[28] eq 'ON'){ if ($$hash{$key}[29] eq 'Default IP'){$$hash{$key}[29]=$Lang::tr{'red1'};} - print "Firewall ($$hash{$key}[29])"; + if ($$hash{$key}[29] eq 'AUTO'){ + 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)); + } + @nat_ifaces=&del_double(@nat_ifaces); + $natstring = join(', ', @nat_ifaces); + }else{ + $natstring = $$hash{$key}[29]; + } + print "$Lang::tr{'firewall'} ($natstring)"; if($$hash{$key}[30] ne ''){ $$hash{$key}[30]=~ tr/|/,/; print": $$hash{$key}[30]";