From 5288b1d64d33c1a0dc26bf46ef0f4db991901358 Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 26 Mar 2008 15:56:50 +0000 Subject: [PATCH] Another ':' parsing issue git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8362 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-common/changelog.txt | 2 +- Shorewall-common/releasenotes.txt | 3 +++ Shorewall-perl/Shorewall/Zones.pm | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Shorewall-common/changelog.txt b/Shorewall-common/changelog.txt index d378ebe2c..98e20d21a 100644 --- a/Shorewall-common/changelog.txt +++ b/Shorewall-common/changelog.txt @@ -14,7 +14,7 @@ Changes in 4.1.7 7) Fix priority mingling in tc filters. -8) Fix policy parsing. +8) Fix ":" parsing errors. Changes in 4.1.6 diff --git a/Shorewall-common/releasenotes.txt b/Shorewall-common/releasenotes.txt index 691944735..fb8ca1a85 100644 --- a/Shorewall-common/releasenotes.txt +++ b/Shorewall-common/releasenotes.txt @@ -92,6 +92,9 @@ Problems corrected in Shorewall-perl 4.1.7. 4) A POLICY of ":" in /etc/shorewall/policy would produce Perl run-time errors. +6) An INTERFACE of ":" in /etc/shorewall/interfaces would produce Perl + run-time errors. + New Features in 4.1.7. 1) If an interface fails when using balanced multi-ISP routing, the diff --git a/Shorewall-perl/Shorewall/Zones.pm b/Shorewall-perl/Shorewall/Zones.pm index 3542478ef..0603c2fdb 100644 --- a/Shorewall-perl/Shorewall/Zones.pm +++ b/Shorewall-perl/Shorewall/Zones.pm @@ -598,7 +598,7 @@ sub validate_interfaces_file( $ ) $first_entry = 0; } - my ($zone, $interface, $networks, $options ) = split_line 2, 4, 'interfaces file'; + my ($zone, $originalinterface, $networks, $options ) = split_line 2, 4, 'interfaces file'; my $zoneref; my $bridge = ''; @@ -614,9 +614,9 @@ sub validate_interfaces_file( $ ) $networks = '' if $networks eq '-'; $options = '' if $options eq '-'; - ( $interface, my ($port, $extra) ) = split /:/ , $interface, 3; + my ($interface, $port, $extra) = split /:/ , $originalinterface, 3; - fatal_error "Invalid INTERFACE (" . join (':', $interface, $port, $extra ) . ')' if defined $extra || ! $interface; + fatal_error "Invalid INTERFACE ($originalinterface)" if ! $interface || defined $extra; fatal_error "Invalid Interface Name (+)" if $interface eq '+';