From 92208251b7f7c5d92b079b8d1c6cf7d8c7b9ddbd Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 9 Nov 2009 07:01:25 -0800 Subject: [PATCH] Add undocumented LOGICAL_NAMES option --- Shorewall/Perl/Shorewall/Config.pm | 3 +++ Shorewall/Perl/Shorewall/Zones.pm | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index f26a86f61..4bc9bb297 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -440,6 +440,7 @@ sub initialize( $ ) { AUTOMAKE => undef , WIDE_TC_MARKS => undef, TRACK_PROVIDERS => undef, + LOGICAL_NAMES => undef, # # Packet Disposition # @@ -547,6 +548,7 @@ sub initialize( $ ) { AUTOMAKE => undef , WIDE_TC_MARKS => undef, TRACK_PROVIDERS => undef, + LOGICAL_NAMES => undef, # # Packet Disposition # @@ -2407,6 +2409,7 @@ sub get_configuration( $ ) { default_yes_no 'AUTOMAKE' , ''; default_yes_no 'WIDE_TC_MARKS' , ''; default_yes_no 'TRACK_PROVIDERS' , ''; + default_yes_no 'LOGICAL_NAMES' , ''; $capabilities{XCONNMARK} = '' unless $capabilities{XCONNMARK_MATCH} and $capabilities{XMARK}; diff --git a/Shorewall/Perl/Shorewall/Zones.pm b/Shorewall/Perl/Shorewall/Zones.pm index fcd4a3d6a..db5c6c9b6 100644 --- a/Shorewall/Perl/Shorewall/Zones.pm +++ b/Shorewall/Perl/Shorewall/Zones.pm @@ -893,7 +893,7 @@ sub process_interface( $ ) { if ( $option eq 'physical' ) { fatal_error "Invalid Physical interface name ($value)" unless $value =~ /^[\w.@%-]+\+?$/; - # fatal_error "The 'physical' option is only allowed on bridge ports" unless $port; + fatal_error "The 'physical' option is only allowed on bridge ports" unless $port || $config{LOGICAL_NAMES}; my $wildphy = $value =~ /\+$/ ? 1 : 0; fatal_error "The type of 'physical' name ($value) doesn't match the type of interface name ($interface)" unless $wildphy == $wildcard; $physical = $value;