From eda48ec9cf08ce17029ca8cdabe3da5fa57fc316 Mon Sep 17 00:00:00 2001 From: teastep Date: Tue, 8 May 2007 15:40:27 +0000 Subject: [PATCH] Fix test for duplicate provider mark (again) git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6284 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Chains.pm | 3 +-- Shorewall-perl/Shorewall/Providers.pm | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Shorewall-perl/Shorewall/Chains.pm b/Shorewall-perl/Shorewall/Chains.pm index 6a167b2f8..5f6138a79 100644 --- a/Shorewall-perl/Shorewall/Chains.pm +++ b/Shorewall-perl/Shorewall/Chains.pm @@ -661,9 +661,8 @@ sub finish_section ( $ ) { sub set_mss1( $$ ) { my ( $chain, $mss ) = @_; my $chainref = ensure_chain 'filter', $chain; - my $policy = $chainref->{policy}; - if ( "$policy" ne 'NONE' ) { + if ( $chainref->{policy} ne 'NONE' ) { insert_rule $chainref, 1, "-p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss $mss" } } diff --git a/Shorewall-perl/Shorewall/Providers.pm b/Shorewall-perl/Shorewall/Providers.pm index 105cb7ae5..20b71f43b 100644 --- a/Shorewall-perl/Shorewall/Providers.pm +++ b/Shorewall-perl/Shorewall/Providers.pm @@ -207,8 +207,8 @@ sub setup_providers() { fatal_error "Invalid Mark Value ($mark) with HIGH_ROUTE_MARKS=No" if ! $config{HIGH_ROUTE_MARKS}; } - for my $num ( values %providers ) { - fatal_error "Duplicate mark value ( $mark )" if $num == $val; + for my $providerref ( values %providers ) { + fatal_error "Duplicate mark value ( $mark )" if $providerref->{mark} == $val; } my $pref = 10000 + $val;