From b46bcd39a1f9052e4f9c983d4e0cb2c4f6913c15 Mon Sep 17 00:00:00 2001 From: teastep Date: Thu, 10 Apr 2008 23:54:52 +0000 Subject: [PATCH] Formalize zone dynamic chain naming git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8417 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Chains.pm | 8 +++++++- Shorewall-perl/Shorewall/Rules.pm | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Shorewall-perl/Shorewall/Chains.pm b/Shorewall-perl/Shorewall/Chains.pm index ce087cdbc..271e27ab8 100644 --- a/Shorewall-perl/Shorewall/Chains.pm +++ b/Shorewall-perl/Shorewall/Chains.pm @@ -95,6 +95,7 @@ our %EXPORT_TAGS = ( dynamic_in dynamic_out dynamic_chains + zone_dynamic_chain dnat_chain snat_chain ecn_chain @@ -665,7 +666,7 @@ sub use_input_chain($) { # sub output_chain($) { - chain_base_cond($_[0]) . '_out'; + chain_base_cond($_[0]) . '_out'; } # @@ -757,6 +758,11 @@ sub dynamic_chains( $ ) #$1 = interface ( $c . '_dyni' , $c . '_dynf' , $c . '_dyno' ); } +sub zone_dynamic_chain( $ ) # $1 = zone +{ + $_[0] . '_dyn'; + +} # # DNAT Chain from a zone # diff --git a/Shorewall-perl/Shorewall/Rules.pm b/Shorewall-perl/Shorewall/Rules.pm index 5dc7fcdb0..27ebf4125 100644 --- a/Shorewall-perl/Shorewall/Rules.pm +++ b/Shorewall-perl/Shorewall/Rules.pm @@ -1496,7 +1496,7 @@ sub generate_matrix() { # sub create_zone_dyn_chain( $$ ) { my ( $zone , $chainref ) = @_; - add_jump $chainref, "${zone}_dyn"; + add_jump $chainref, zone_dynamic_chain $zone; } #