summaryrefslogtreecommitdiff
path: root/lib/Vyatta/IpTables/IpSet.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Vyatta/IpTables/IpSet.pm')
-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);
}