On 05/07/2012 07:16 AM, Steven Jan Springl wrote:
3) The GATEWAY column of the tunnels file has been renamed 'GATEWAYS'
and now accepts a list of host and network addresses as well as IP
ranges.
Tom
When using "Alternate Specification of Column Values" in the tunnels file,
Shorewall accepts gateway=value instead of gateways=value.
--------------------------------------------------------------------------------------------
Specifying FORMAT followed by a value other than 1 or 2 in the interfaces file
produces the following message:
Use of uninitialized value $1 in concatenation (.) or string at
/usr/share/shorewall/Shorewall/Zones.pm line 937,<$currentfile> line 30.
Steven,
Here are a couple of patches. The fix for tunnels also allows 'gateway'
for backward compatibility. A similar issue is corrected in the tcrules
file where the MARK column was recently renamed ACTION.
Thanks,
-Tom
--
Tom Eastep \ When I die, I want to go like my Grandfather who
Shoreline, \ died peacefully in his sleep. Not screaming like
Washington, USA \ all of the passengers in his car
http://shorewall.net \________________________________________________
diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm
index bb28445..9733758 100644
--- a/Shorewall/Perl/Shorewall/Config.pm
+++ b/Shorewall/Perl/Shorewall/Config.pm
@@ -1471,8 +1471,8 @@ sub supplied( $ ) {
sub split_line1( $$;$ ) {
my ( $description, $columnsref, $nopad) = @_;
- my @maxcolumns = ( keys %$columnsref );
- my $maxcolumns = @maxcolumns;
+ my @maxcolumns = ( sort { $a <=> $b } values %$columnsref );
+ my $maxcolumns = ( $maxcolumns[-1] || 0 ) + 1;
#
# First see if there is a semicolon on the line; what follows will be column/value paris
#
diff --git a/Shorewall/Perl/Shorewall/Tc.pm b/Shorewall/Perl/Shorewall/Tc.pm
index 0fb95d3..2ffa651 100644
--- a/Shorewall/Perl/Shorewall/Tc.pm
+++ b/Shorewall/Perl/Shorewall/Tc.pm
@@ -197,11 +197,11 @@ sub process_tc_rule( ) {
my ( $originalmark, $source, $dest, $proto, $ports, $sports, $user, $testval, $length, $tos , $connbytes, $helper, $headers, $probability , $dscp );
if ( $family == F_IPV4 ) {
( $originalmark, $source, $dest, $proto, $ports, $sports, $user, $testval, $length, $tos , $connbytes, $helper, $probability, $dscp ) =
- split_line1 'tcrules file', { mark => 0, source => 1, dest => 2, proto => 3, dport => 4, sport => 5, user => 6, test => 7, length => 8, tos => 9, connbytes => 10, helper => 11, probability => 12 , dscp => 13 };
+ split_line1 'tcrules file', { mark => 0, action => 0, source => 1, dest => 2, proto => 3, dport => 4, sport => 5, user => 6, test => 7, length => 8, tos => 9, connbytes => 10, helper => 11, probability => 12 , dscp => 13 };
$headers = '-';
} else {
( $originalmark, $source, $dest, $proto, $ports, $sports, $user, $testval, $length, $tos , $connbytes, $helper, $headers, $probability, $dscp ) =
- split_line1 'tcrules file', { mark => 0, source => 1, dest => 2, proto => 3, dport => 4, sport => 5, user => 6, test => 7, length => 8, tos => 9, connbytes => 10, helper => 11, headers => 12, probability => 13 , dscp => 14 };
+ split_line1 'tcrules file', { mark => 0, action => 0, source => 1, dest => 2, proto => 3, dport => 4, sport => 5, user => 6, test => 7, length => 8, tos => 9, connbytes => 10, helper => 11, headers => 12, probability => 13 , dscp => 14 };
}
our @tccmd;
diff --git a/Shorewall/Perl/Shorewall/Tunnels.pm b/Shorewall/Perl/Shorewall/Tunnels.pm
index dd1757f..eae6a7b 100644
--- a/Shorewall/Perl/Shorewall/Tunnels.pm
+++ b/Shorewall/Perl/Shorewall/Tunnels.pm
@@ -292,7 +292,7 @@ sub setup_tunnels() {
while ( read_a_line( NORMAL_READ ) ) {
- my ( $kind, $zone, $gateway, $gatewayzones ) = split_line1 'tunnels file', { type => 0, zone => 1, gateway => 2, gateway_zone => 3 };
+ my ( $kind, $zone, $gateway, $gatewayzones ) = split_line1 'tunnels file', { type => 0, zone => 1, gateway => 2, gateways => 2, gateway_zone => 3 };
fatal_error 'TYPE must be specified' if $kind eq '-';
fatal_error 'ZONE must be specified' if $zone eq '-';
diff --git a/Shorewall/Perl/Shorewall/Zones.pm b/Shorewall/Perl/Shorewall/Zones.pm
index 4239218..6ff384e 100644
--- a/Shorewall/Perl/Shorewall/Zones.pm
+++ b/Shorewall/Perl/Shorewall/Zones.pm
@@ -934,7 +934,7 @@ sub process_interface( $$ ) {
return;
}
- fatal_error "Invalid FORMAT ($1)";
+ fatal_error "Invalid FORMAT ($originalinterface)";
}
if ( $zone eq '-' ) {
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Shorewall-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-devel