summaryrefslogtreecommitdiff
path: root/lib/Vyatta/IpTables/IpSet.pm
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-03-26 15:52:14 +0700
committerGitHub <noreply@github.com>2018-03-26 15:52:14 +0700
commitc22fd4e612bdc9e95474baa0bc7d0cf3d2144ebc (patch)
tree3c726e42dbc45292f232fd47258d0fac6cfd0d30 /lib/Vyatta/IpTables/IpSet.pm
parentce9af44139520d8a0f1f3e25cfe06e68e48f8cea (diff)
parentfc5e3b8bb61690619ee739f11cac54abb689d5f2 (diff)
downloadvyatta-cfg-firewall-c22fd4e612bdc9e95474baa0bc7d0cf3d2144ebc.tar.gz
vyatta-cfg-firewall-c22fd4e612bdc9e95474baa0bc7d0cf3d2144ebc.zip
Merge pull request #9 from mtudosoiu/current
Task T35 change to solve port-group issue
Diffstat (limited to 'lib/Vyatta/IpTables/IpSet.pm')
-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..ba5e68d 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';
+ $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