From 1da5320dd0ca6fbddd728aefe5bea8dc29f81022 Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Sat, 20 Dec 2008 14:38:55 -0800 Subject: Fix 3815: FW: Hyphenated port names treated as ranges in firewall rules. --- lib/Vyatta/Misc.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3