From 8df55c2e5fdf405b56a737cc1cd90abed957b358 Mon Sep 17 00:00:00 2001 From: teastep Date: Tue, 17 Apr 2007 23:30:09 +0000 Subject: [PATCH] Enough of this (really) git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5989 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Chains.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Shorewall-perl/Shorewall/Chains.pm b/Shorewall-perl/Shorewall/Chains.pm index 927c3cfdf..2f7a6d7fa 100644 --- a/Shorewall-perl/Shorewall/Chains.pm +++ b/Shorewall-perl/Shorewall/Chains.pm @@ -669,10 +669,9 @@ sub do_proto( $$$ ) } } } elsif ( $proto =~ /^(icmp|1)$/i ) { - my @ports = split /,/, $ports; - fatal_error 'Multiple ICMP types are not permitted' if @ports > 1; + fatal_error 'Multiple ICMP types are not permitted' if $ports =~ /,/; $output .= "-p icmp "; - $output .= "--icmp-type $ports " if @ports; + $output .= "--icmp-type $ports " if $ports; fatal_error 'SOURCE PORT(S) not permitted with ICMP' if $sports ne ''; } elsif ( $proto =~ /^(ipp2p(:(tcp|udp|all)))?$/i ) { require_capability( 'IPP2P' , 'PROTO = ipp2p' ); @@ -695,7 +694,7 @@ sub mac_match( $ ) { $mac =~ s/^(!?)~//; $mac =~ s/^!// if my $invert = ( $1 ? '! ' : ''); - $mac =~ s/-/:/g; + $mac =~ tr/-/:/; "--match mac --mac-source ${invert}$mac "; }