From d388b29d70c5b97b72993f2ef84ccdcecd4aba63 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sat, 5 Jun 2010 08:40:00 -0700 Subject: [PATCH] Let Zones.pm export chain_base rather than Chains.pm --- Shorewall/Perl/Shorewall/Chains.pm | 13 ------------- Shorewall/Perl/Shorewall/Providers.pm | 6 +++++- Shorewall/Perl/Shorewall/Zones.pm | 1 + 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 8a30f4342..96d26a3f4 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -86,7 +86,6 @@ our %EXPORT_TAGS = ( clear_comment incr_cmd_level decr_cmd_level - chain_base forward_chain rules_chain zone_forward_chain @@ -833,18 +832,6 @@ sub copy_rules( $$ ) { } } -# -# Transform the passed interface name into a legal shell variable name. -# -sub chain_base($) { - my $chain = $_[0]; - - $chain =~ s/^@/at_/; - $chain =~ tr/[.\-%@]/_/; - $chain =~ s/\+$//; - $chain; -} - # # Name of canonical chain between an ordered pair of zones # diff --git a/Shorewall/Perl/Shorewall/Providers.pm b/Shorewall/Perl/Shorewall/Providers.pm index 8d0c29265..be9d97060 100644 --- a/Shorewall/Perl/Shorewall/Providers.pm +++ b/Shorewall/Perl/Shorewall/Providers.pm @@ -844,7 +844,11 @@ sub lookup_provider( $ ) { sub handle_optional_interfaces( $ ) { my $returnvalue = verify_required_interfaces( shift ); - + # + # find_interfaces_by_option1() does not return wildcard interfaces. If an interface is defined + # as a wildcard in /etc/shorewall/interfaces, then only specific interfaces matching that + # wildcard are returned. + # my $interfaces = find_interfaces_by_option1 'optional'; if ( @$interfaces ) { diff --git a/Shorewall/Perl/Shorewall/Zones.pm b/Shorewall/Perl/Shorewall/Zones.pm index a62598b06..384cbe56f 100644 --- a/Shorewall/Perl/Shorewall/Zones.pm +++ b/Shorewall/Perl/Shorewall/Zones.pm @@ -54,6 +54,7 @@ our @EXPORT = qw( NOTHING complex_zones non_firewall_zones single_interface + chain_base validate_interfaces_file all_interfaces all_bridges