Another fix for 'detectnets'

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6061 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-04-22 15:26:47 +00:00
parent 27433b33e5
commit 897a7b55b6

View File

@ -1437,6 +1437,7 @@ sub generate_matrix() {
my $need_broadcast = {}; ### Fixme ###
my $frwd_ref = 0;
my $chain = 0;
my %needbroadcast;
if ( $complex ) {
$frwd_ref = $filter_table->{"${zone}_frwd"};
@ -1486,10 +1487,20 @@ sub generate_matrix() {
add_rule $filter_table->{forward_chain $interface} , join( '', $source, $ipsec_in_match. "-j $frwd_ref->{name}" )
if $complex && $hostref->{ipsec} ne 'ipsec';
$needbroadcast{$interface} = 1 if get_interface_option $interface, 'detectnets';
}
}
}
}
if ( $chain1 ) {
for my $interface ( keys %needbroadcast ) {
add_rule filter_table{out_chain $interface} , "-d 255.255.255.255 -j $chain1";
add_rule filter_table{out_chain $interface} , "-d 224.0.0.0/4 -j $chain1";
}
}
#
# F O R W A R D I N G
#