diff --git a/Shorewall/Perl/Shorewall/IPAddrs.pm b/Shorewall/Perl/Shorewall/IPAddrs.pm index 30ab2140d..5399b64a2 100644 --- a/Shorewall/Perl/Shorewall/IPAddrs.pm +++ b/Shorewall/Perl/Shorewall/IPAddrs.pm @@ -338,7 +338,7 @@ sub validate_portpair( $$ ) { my @ports = split /:/, $portpair, 2; - $_ = validate_port( $proto, $_) for ( @ports ); + $_ = validate_port( $proto, $_) for ( grep $_, @ports ); if ( @ports == 2 ) { fatal_error "Invalid port range ($portpair)" unless $ports[0] < $ports[1];