From a4fa63979391ac78dda2f75a1e30e98dfda9d0d8 Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 28 Mar 2007 19:09:27 +0000 Subject: [PATCH] Minor tweaks git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5733 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- New/Shorewall/Chains.pm | 1 + New/Shorewall/Common.pm | 4 ++-- New/Shorewall/Rules.pm | 4 +--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/New/Shorewall/Chains.pm b/New/Shorewall/Chains.pm index e530e4f4d..bb35e726d 100644 --- a/New/Shorewall/Chains.pm +++ b/New/Shorewall/Chains.pm @@ -1405,6 +1405,7 @@ sub addnatjump( $$$ ) { clearrule; } } + # # If the destination chain exists, then at the position in the source chain given by $$countref, add a jump to the destination. # diff --git a/New/Shorewall/Common.pm b/New/Shorewall/Common.pm index 5d0570986..947319958 100644 --- a/New/Shorewall/Common.pm +++ b/New/Shorewall/Common.pm @@ -135,7 +135,7 @@ sub emit ( $ ) { # # 'compile' as opposed to 'check' # - my $line = $_[0]; + my $line = $_[0]; # This copy is necessary :-(. We modify the value below and we can't modify subroutine arguments. unless ( $line =~ /^\s*$/ ) { $line =~ s/^\n// if $lastlineblank; @@ -160,7 +160,7 @@ sub emitj { # for ( @_ ) { unless ( /^\s*$/ ) { - my $line = $_; + my $line = $_; # This copy is necessary :-(. We modify the value below and we can't modify subroutine arguments. $line =~ s/^\n// if $lastlineblank; $line =~ s/^/$indent/gm if $indent; $line =~ s/ /\t/g; diff --git a/New/Shorewall/Rules.pm b/New/Shorewall/Rules.pm index 886129070..733e4d501 100644 --- a/New/Shorewall/Rules.pm +++ b/New/Shorewall/Rules.pm @@ -163,9 +163,7 @@ sub setup_ecn() } for my $host ( @hosts ) { - my ( $interface, $net ) = ( @$host ); - - add_rule $mangle_table->{ecn_chain $interface}, join ('', '-p tcp ', match_dest_net( $net ) , ' -j ECN --ecn-tcp-remove' ); + add_rule $mangle_table->{ecn_chain $host->[0]}, join ('', '-p tcp ', match_dest_net( $host->[1] ) , ' -j ECN --ecn-tcp-remove' ); } } }