diff options
author | Gaurav Sinha <gaurav.sinha@vyatta.com> | 2013-01-17 13:41:43 -0800 |
---|---|---|
committer | Gaurav Sinha <gaurav.sinha@vyatta.com> | 2013-01-22 16:39:17 -0800 |
commit | cbe4da52e1c993f027516ed9540b5fd113950b29 (patch) | |
tree | 2919e1b33038d87afc128fb380c8c86d7b3370a4 | |
parent | 9c69a6227f20be103a1ba6c7313a11baaf9f9642 (diff) | |
download | vyatta-cfg-firewall-cbe4da52e1c993f027516ed9540b5fd113950b29.tar.gz vyatta-cfg-firewall-cbe4da52e1c993f027516ed9540b5fd113950b29.zip |
Fixing 8622
(cherry picked from commit 6870e3d05f62ceecf4824f551861106409761b35)
-rwxr-xr-x | lib/Vyatta/IpTables/IpSet.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Vyatta/IpTables/IpSet.pm b/lib/Vyatta/IpTables/IpSet.pm index e64a5ff..b8cfb38 100755 --- a/lib/Vyatta/IpTables/IpSet.pm +++ b/lib/Vyatta/IpTables/IpSet.pm @@ -418,7 +418,7 @@ sub add_member { # service name or port name may contain a hyphen, which needs to be escaped # using square brackets in ipset, to avoid confusion with port ranges - if (($member =~ /^([^-]+)-([^-]+)$/) and ($hyphenated_port eq 'false')) { + if (($member =~ /^([^-]+)-([^-]+)$/) and ((defined ($hyphenated_port)) and ($hyphenated_port eq 'false'))) { return $self->add_member_range($1, $2, $alias); } @@ -461,7 +461,7 @@ sub delete_member { # service name or port name may contain a hyphen, which needs to be escaped # using square brackets in ipset, to avoid confusion with port ranges - if (($member =~ /^([^-]+)-([^-]+)$/) and ($hyphenated_port eq 'false')) { + if (($member =~ /^([^-]+)-([^-]+)$/) and ((defined($hyphenated_port)) and ($hyphenated_port eq 'false'))) { return $self->delete_member_range($1, $2); } |