Fix 'detect' in GATEWAY column

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6265 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-05-07 14:28:23 +00:00
parent 09f968819e
commit b9fcda9812
4 changed files with 8 additions and 2 deletions

View File

@ -10,6 +10,8 @@ Changes in 3.9.7
5) Fix more hosts file bugs. 5) Fix more hosts file bugs.
6) Fix 'detect' in GATEWAY column of providers file.
Changes in 3.9.6 Changes in 3.9.6
1) Fix parsing problems in protocol handling. 1) Fix parsing problems in protocol handling.

View File

@ -37,6 +37,9 @@ Problems corrected in 3.9.7.
- -A eth0_fwd -s 192.168.0.0/24-m policy --dir in --pol ipsec -j - -A eth0_fwd -s 192.168.0.0/24-m policy --dir in --pol ipsec -j
HASH(0x8345924)->n{name} HASH(0x8345924)->n{name}
4) A value of 'detect' in the GATEWAY column of the providers file no
longer generates an error during [re]start.
Other changes in Shorewall 3.9.6. Other changes in Shorewall 3.9.6.
None. None.

View File

@ -184,6 +184,7 @@ sub setup_providers() {
'else', 'else',
" fatal_error \"Unable to detect the gateway through interface $interface\"", " fatal_error \"Unable to detect the gateway through interface $interface\"",
"fi\n" ); "fi\n" );
$gateway = '$gateway';
} elsif ( $gateway && $gateway ne '-' ) { } elsif ( $gateway && $gateway ne '-' ) {
emit "run_ip route replace $gateway src \$(find_first_interface_address $interface) dev $interface table $number"; emit "run_ip route replace $gateway src \$(find_first_interface_address $interface) dev $interface table $number";
emit "run_ip route add default via $gateway dev $interface table $number"; emit "run_ip route add default via $gateway dev $interface table $number";

View File

@ -1583,7 +1583,7 @@ sub generate_matrix() {
my $chain = rules_target $zone, $zone1; my $chain = rules_target $zone, $zone1;
next unless $chain; next unless $chain; # CONTINUE policy with no rules
push @rule_chains, [ $zone , $zone1 , $chain ] if $config{DYNAMIC_ZONES}; push @rule_chains, [ $zone , $zone1 , $chain ] if $config{DYNAMIC_ZONES};
@ -1654,7 +1654,7 @@ sub generate_matrix() {
for my $net1 ( @{$host1ref->{hosts}} ) { for my $net1 ( @{$host1ref->{hosts}} ) {
unless ( $interface eq $interface1 && $net eq $net1 && ! $host1ref->{options}{routeback} ) { unless ( $interface eq $interface1 && $net eq $net1 && ! $host1ref->{options}{routeback} ) {
# #
# We have to defer evaluation of the source net match to accomodate systems without $capabilities{KLUDEFREE}; # We defer evaluation of the source net match to accomodate systems without $capabilities{KLUDEFREE};
# #
add_rule add_rule
$chain3ref , $chain3ref ,