summaryrefslogtreecommitdiff
path: root/lib/Vyatta
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@io.vyatta.com>2008-12-20 14:38:55 -0800
committerStig Thormodsrud <stig@io.vyatta.com>2008-12-20 14:38:55 -0800
commit1da5320dd0ca6fbddd728aefe5bea8dc29f81022 (patch)
treea5bc55e9eaf370a2ddac042c340a8ee6bdd2ccb8 /lib/Vyatta
parentd9976a31c4e34a2787c2bc5212e6e8c49e95b442 (diff)
downloadvyatta-cfg-1da5320dd0ca6fbddd728aefe5bea8dc29f81022.tar.gz
vyatta-cfg-1da5320dd0ca6fbddd728aefe5bea8dc29f81022.zip
Fix 3815: FW: Hyphenated port names treated as ranges in firewall rules.
Diffstat (limited to 'lib/Vyatta')
-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;