summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Misc.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Vyatta/Misc.pm')
-rwxr-xr-xlib/Vyatta/Misc.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Vyatta/Misc.pm b/lib/Vyatta/Misc.pm
index b99bc22..e46019b 100755
--- a/lib/Vyatta/Misc.pm
+++ b/lib/Vyatta/Misc.pm
@@ -434,7 +434,7 @@ sub getPortRuleString {
$port_str = $1;
$negate = '! ';
}
- $port_str =~ s/-/:/g;
+ $port_str =~ s/(\d+)-(\d+)/$1:$2/g;
my $num_ports = 0;
my @port_specs = split /,/, $port_str;