summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarian Tudosoiu <marian.tudosoiu@1and1.ro>2018-03-23 11:00:49 +0200
committerMarian Tudosoiu <marian.tudosoiu@1and1.ro>2018-03-23 11:00:49 +0200
commit9e61589926f6801c318406d373d5b9d01922e12e (patch)
treedbe11fa37caf934f3a641d7c4b39966a4672440f /lib
parent1d21300885e606ec9e8da2b9a9b7af898d896a24 (diff)
downloadvyatta-cfg-firewall-9e61589926f6801c318406d373d5b9d01922e12e.tar.gz
vyatta-cfg-firewall-9e61589926f6801c318406d373d5b9d01922e12e.zip
Task T35 change to solve port-group issue
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Vyatta/IpTables/IpSet.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Vyatta/IpTables/IpSet.pm b/lib/Vyatta/IpTables/IpSet.pm
index cee7935..5258773 100755
--- a/lib/Vyatta/IpTables/IpSet.pm
+++ b/lib/Vyatta/IpTables/IpSet.pm
@@ -190,11 +190,13 @@ sub create {
my $ipset_param = $grouptype_hash{$self->{_type}};
return "Error: invalid group type\n" if !defined $ipset_param;
+ my $cmd = "ipset -N $self->{_name} $ipset_param family $self->{_family}";
+
if ($self->{_type} eq 'port') {
$ipset_param .= ' --from 1 --to 65535';
+ my $cmd = "ipset -N $self->{_name} $ipset_param";
}
- my $cmd = "ipset -N $self->{_name} $ipset_param family $self->{_family}";
my $rc = $self->run_cmd($cmd);
return "Error: call to ipset failed [$rc]" if $rc;
return; # undef