summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaurav Sinha <gaurav.sinha@vyatta.com>2013-01-17 13:41:43 -0800
committerGaurav Sinha <gaurav.sinha@vyatta.com>2013-01-17 13:41:43 -0800
commit6870e3d05f62ceecf4824f551861106409761b35 (patch)
treee1e8e9a1d7f48865c6937f7be877fe736dacba97
parent1a40314336b6bf75ba8404ca19133466faa962d1 (diff)
downloadvyatta-cfg-firewall-6870e3d05f62ceecf4824f551861106409761b35.tar.gz
vyatta-cfg-firewall-6870e3d05f62ceecf4824f551861106409761b35.zip
Fixing 8622
-rwxr-xr-xlib/Vyatta/IpTables/IpSet.pm4
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);
}