From d0fc7f6547fa559a82923dab7338b07f11c604ee Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 13 Jul 2015 12:57:00 -0700 Subject: [PATCH 1/2] Add some comments to the Zones module Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Zones.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Zones.pm b/Shorewall/Perl/Shorewall/Zones.pm index e97bba848..64f7e07d2 100644 --- a/Shorewall/Perl/Shorewall/Zones.pm +++ b/Shorewall/Perl/Shorewall/Zones.pm @@ -1549,10 +1549,16 @@ sub known_interface($) my $iface = $interface; if ( $minroot ) { + # + # We have wildcard interfaces -- see if this interface matches one of their roots + # while ( length $iface > $minroot ) { chop $iface; if ( my $i = $roots{$iface} ) { + # + # Found one + # $interfaceref = $interfaces{$i}; my $physical = map_physical( $interface, $interfaceref ); @@ -1682,9 +1688,8 @@ sub source_port_to_bridge( $ ) { return $portref ? $portref->{bridge} : ''; } - # -# Returns a hash reference for the zones interface through the interface +# Returns a hash reference for the zones interfaced through the interface # sub interface_zones( $ ) { my $interfaceref = known_interface( $_[0] ); @@ -1719,7 +1724,7 @@ sub interface_is_required($) { } # -# Return true if the interface is 'plain' +# Return true if the interface is 'plain' (not optional, required or ignored and not a bridge port). # sub interface_is_plain($) { my $interfaceref = $interfaces{$_[0]}; From df817b6d2ccacc372aceb973f56f9e3c5517af1f Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 13 Jul 2015 13:06:53 -0700 Subject: [PATCH 2/2] Correct formatting in the interfaces man pages Signed-off-by: Tom Eastep --- Shorewall/manpages/shorewall-interfaces.xml | 10 +++++----- Shorewall6/manpages/shorewall6-interfaces.xml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Shorewall/manpages/shorewall-interfaces.xml b/Shorewall/manpages/shorewall-interfaces.xml index aab22ae02..fc2f33d28 100644 --- a/Shorewall/manpages/shorewall-interfaces.xml +++ b/Shorewall/manpages/shorewall-interfaces.xml @@ -213,7 +213,7 @@ loc eth2 - changed; the value assigned to the setting will be the value specified (if any) or 1 if no value is given. - + This option does not work with a wild-card @@ -247,7 +247,7 @@ loc eth2 - 8 - do not reply for all local addresses - + This option does not work with a wild-card @@ -255,7 +255,7 @@ loc eth2 - the INTERFACE column. - + Do not specify 1 teastep@lists:~$ - + This option does not work with a wild-card @@ -760,7 +760,7 @@ loc eth2 - - unmanaged + unmanaged Added in Shorewall 4.5.18. Causes all traffic between diff --git a/Shorewall6/manpages/shorewall6-interfaces.xml b/Shorewall6/manpages/shorewall6-interfaces.xml index 697516c4d..83ccb32b1 100644 --- a/Shorewall6/manpages/shorewall6-interfaces.xml +++ b/Shorewall6/manpages/shorewall6-interfaces.xml @@ -538,7 +538,7 @@ loc eth2 - - unmanaged + unmanaged Added in Shorewall 4.5.18. Causes all traffic between