From bb923492a3553012ad440d2d870ff768b1c16093 Mon Sep 17 00:00:00 2001 From: teastep Date: Sun, 29 Jul 2007 15:03:29 +0000 Subject: [PATCH] Back out chain name fix (broke dynamic zones) git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6994 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-common/changelog.txt | 5 +++- Shorewall-perl/Shorewall/Chains.pm | 40 ++++++++++++------------------ 2 files changed, 20 insertions(+), 25 deletions(-) diff --git a/Shorewall-common/changelog.txt b/Shorewall-common/changelog.txt index d6c1b73b0..886859e87 100644 --- a/Shorewall-common/changelog.txt +++ b/Shorewall-common/changelog.txt @@ -16,7 +16,10 @@ Changes in 4.0.1 8) Better out-of-order policy detection. -9) Fix dropBcast/allowBcast logging and other logging fixes/improvements. +9) Fix dropBcast/allowBcast logging and other logging + fixes/improvements. + +10) Cleaner way to handle quotes in rules. Changes in 4.0.0 Final diff --git a/Shorewall-perl/Shorewall/Chains.pm b/Shorewall-perl/Shorewall/Chains.pm index 1548ea894..7630def4e 100644 --- a/Shorewall-perl/Shorewall/Chains.pm +++ b/Shorewall-perl/Shorewall/Chains.pm @@ -450,20 +450,12 @@ sub chain_base($) { $chain; } -# -# Forward Chain for an interface -# -sub forward_chain($) -{ - $_[0] . '_fwd'; -} - # # Input Chain for an interface # sub input_chain($) { - $_[0] . '_in'; + chain_base( $_[0] ) . '_in'; } # @@ -471,7 +463,7 @@ sub input_chain($) # sub output_chain($) { - $_[0] . '_out'; + chain_base( $_[0] ) . '_out'; } # @@ -479,26 +471,26 @@ sub output_chain($) # sub masq_chain($) { - $_[0] . '_masq'; + chain_base( $_[0] ) . '_masq'; } # -# Syn_flood_chain -- differs from the other _chain functions in that the argument is a chain table reference +# Syn_chain # -sub syn_flood_chain ( $ ) { - '@' . $_[0]->{synchain}; +sub syn_chain ( $ ) { + '@' . $_[0]; } # # MAC Verification Chain for an interface # sub mac_chain( $ ) { - $_[0] . '_mac'; + chain_base( $_[0] ) . '_mac'; } sub macrecent_target($) { - $config{MACLIST_TTL} ? $_[0] . '_rec' : 'RETURN'; + $config{MACLIST_TTL} ? chain_base( $_[0] ) . '_rec' : 'RETURN'; } # @@ -506,22 +498,22 @@ sub macrecent_target($) # sub dynamic_fwd( $ ) { - $_[0] . '_dynf'; + chain_base( $_[0] ) . '_dynf'; } sub dynamic_in( $ ) { - $_[0] . '_dyni'; + chain_base( $_[0] ) . '_dyni'; } sub dynamic_out( $ ) # $1 = interface { - $_[0] . '_dyno'; + chain_base( $_[0] ) . '_dyno'; } sub dynamic_chains( $ ) #$1 = interface { - my $c = $_[0]; + my $c = chain_base( $_[0] ); [ $c . '_dyni' , $c . '_dynf' , $c . '_dyno' ]; } @@ -531,7 +523,7 @@ sub dynamic_chains( $ ) #$1 = interface # sub dnat_chain( $ ) { - $_[0] . '_dnat'; + chain_base( $_[0] ) . '_dnat'; } # @@ -539,7 +531,7 @@ sub dnat_chain( $ ) # sub snat_chain( $ ) { - $_[0] . '_snat'; + chain_base( $_[0] ) . '_snat'; } # @@ -547,7 +539,7 @@ sub snat_chain( $ ) # sub ecn_chain( $ ) { - $_[0] . '_ecn'; + chain_base( $_[0] ) . '_ecn'; } # @@ -555,7 +547,7 @@ sub ecn_chain( $ ) # sub first_chains( $ ) #$1 = interface { - my $c = $_[0]; + my $c = chain_base $_[0]; [ $c . '_fwd', $c . '_in' ]; }