From 72f65a6e397db744e928e2f107570dec9b5f5aa1 Mon Sep 17 00:00:00 2001 From: teastep Date: Thu, 11 Dec 2008 17:16:06 +0000 Subject: [PATCH] Allow :[
] in rules git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8990 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Chains.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Shorewall-perl/Shorewall/Chains.pm b/Shorewall-perl/Shorewall/Chains.pm index f9f394025..d591a72d1 100644 --- a/Shorewall-perl/Shorewall/Chains.pm +++ b/Shorewall-perl/Shorewall/Chains.pm @@ -1986,7 +1986,11 @@ sub expand_rule( $$$$$$$$$$$ ) $iiface = $1; $inets = $2; } elsif ( $source =~ /:/ ) { - $inets = $source; + if ( $source =~ /^\[(.+)\]$/ ) { + $inets = $1; + } else { + $inets = $source; + } } elsif ( $source =~ /\+|~|\..*\./ ) { $inets = $source; } else { @@ -2069,7 +2073,11 @@ sub expand_rule( $$$$$$$$$$$ ) $diface = $1; $dnets = $2; } elsif ( $dest =~ /:/ ) { - $dnets = $dest; + if ( $dest =~ /^\[(.+)\]$/ ) { + $dnets = $1; + } else { + $dnets = $dest; + } } elsif ( $dest =~ /\+|~|\..*\./ ) { $dnets = $dest; } else {