From b9fcda9812aaa610c590b92b589ffbb2adf3c4ec Mon Sep 17 00:00:00 2001 From: teastep Date: Mon, 7 May 2007 14:28:23 +0000 Subject: [PATCH] Fix 'detect' in GATEWAY column git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6265 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-common/changelog.txt | 2 ++ Shorewall-common/releasenotes.txt | 3 +++ Shorewall-perl/Shorewall/Providers.pm | 1 + Shorewall-perl/Shorewall/Rules.pm | 4 ++-- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Shorewall-common/changelog.txt b/Shorewall-common/changelog.txt index 8966b4b0d..6d693ea38 100644 --- a/Shorewall-common/changelog.txt +++ b/Shorewall-common/changelog.txt @@ -10,6 +10,8 @@ Changes in 3.9.7 5) Fix more hosts file bugs. +6) Fix 'detect' in GATEWAY column of providers file. + Changes in 3.9.6 1) Fix parsing problems in protocol handling. diff --git a/Shorewall-common/releasenotes.txt b/Shorewall-common/releasenotes.txt index d469caa8b..7e90b282c 100644 --- a/Shorewall-common/releasenotes.txt +++ b/Shorewall-common/releasenotes.txt @@ -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 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. None. diff --git a/Shorewall-perl/Shorewall/Providers.pm b/Shorewall-perl/Shorewall/Providers.pm index c5e225f56..b96c9bde8 100644 --- a/Shorewall-perl/Shorewall/Providers.pm +++ b/Shorewall-perl/Shorewall/Providers.pm @@ -184,6 +184,7 @@ sub setup_providers() { 'else', " fatal_error \"Unable to detect the gateway through interface $interface\"", "fi\n" ); + $gateway = '$gateway'; } elsif ( $gateway && $gateway ne '-' ) { 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"; diff --git a/Shorewall-perl/Shorewall/Rules.pm b/Shorewall-perl/Shorewall/Rules.pm index 2871b929d..27606c194 100644 --- a/Shorewall-perl/Shorewall/Rules.pm +++ b/Shorewall-perl/Shorewall/Rules.pm @@ -1583,7 +1583,7 @@ sub generate_matrix() { 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}; @@ -1654,7 +1654,7 @@ sub generate_matrix() { for my $net1 ( @{$host1ref->{hosts}} ) { 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 $chain3ref ,