diff options
author | Daniil Baturin <daniil@baturin.org> | 2018-03-26 15:52:14 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-26 15:52:14 +0700 |
commit | c22fd4e612bdc9e95474baa0bc7d0cf3d2144ebc (patch) | |
tree | 3c726e42dbc45292f232fd47258d0fac6cfd0d30 /lib | |
parent | ce9af44139520d8a0f1f3e25cfe06e68e48f8cea (diff) | |
parent | fc5e3b8bb61690619ee739f11cac54abb689d5f2 (diff) | |
download | vyatta-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')
-rwxr-xr-x | lib/Vyatta/IpTables/IpSet.pm | 4 |
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 |