]> granicus.if.org Git - ipset/log
ipset
11 years agoipset: fix timeout data type size
Nikolay Martynov [Thu, 31 Oct 2013 04:34:31 +0000 (00:34 -0400)]
ipset: fix timeout data type size

Currently it is impossible to set timeout on some architectures
(MIPS ar71xx at least) because timeout is parsed into long long data
type but used as uint32 without proper conversion. This patch fixes
this issue. Tested on ar71xx router.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoipset 6.20.1 released v6.20.1
Jozsef Kadlecsik [Sun, 27 Oct 2013 18:38:37 +0000 (19:38 +0100)]
ipset 6.20.1 released

11 years agobuild: fix incorrect library versioning
Jan Engelhardt [Sun, 20 Oct 2013 13:17:24 +0000 (15:17 +0200)]
build: fix incorrect library versioning

Commit v6.20~12 caused libipset to shift from libipset.so.3 to
.so.2. That is the wrong thing to do. Set it back to 3+2, as
intended.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agonetfilter: ipset: remove duplicate define
Michael Opdenacker [Sun, 27 Oct 2013 18:06:45 +0000 (19:06 +0100)]
netfilter: ipset: remove duplicate define

This patch removes a duplicate define from
net/netfilter/ipset/ip_set_hash_gen.h

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
11 years agonet->user_ns is available starting from 3.8, add compatibility checking
Jozsef Kadlecsik [Sun, 27 Oct 2013 18:00:36 +0000 (19:00 +0100)]
net->user_ns is available starting from 3.8, add compatibility checking

Reported by Jan Engelhardt

11 years agoFix memory allocation for bitmap:port
Jozsef Kadlecsik [Fri, 18 Oct 2013 12:03:41 +0000 (14:03 +0200)]
Fix memory allocation for bitmap:port

At the restructuring of the bitmap types creation in ipset, for the
bitmap:port type wrong (too large) memory allocation was copied
(netfilter bugzilla id #859).

Reported-by: Quentin Armitage <quentin@armitage.org.uk>
11 years agonetfilter: ipset: Fix configure failure when --with-kmod=no
Oliver Smith [Fri, 11 Oct 2013 14:41:12 +0000 (16:41 +0200)]
netfilter: ipset: Fix configure failure when --with-kmod=no

When configuring the sources to build without kernel modules, the path
to the kernel sources was not set and the kernel header files were still
checked.

Now, we do not check the kernel sources for compatibility if we're not
going to build any kernel modules.

Signed-off-by: Oliver Smith <oliver@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoAvoid clashing with configured kernel in [CONFIG_]IP_SET_MAX
Jozsef Kadlecsik [Tue, 8 Oct 2013 19:16:01 +0000 (21:16 +0200)]
Avoid clashing with configured kernel in [CONFIG_]IP_SET_MAX

11 years agoThe unnamed union initialization may lead to compilation error
Jozsef Kadlecsik [Tue, 8 Oct 2013 19:05:20 +0000 (21:05 +0200)]
The unnamed union initialization may lead to compilation error

The unnamed union should be possible to be initialized directly, but
unfortunately it's not so:

/usr/src/ipset/kernel/net/netfilter/ipset/ip_set_hash_netnet.c: In
function ?hash_netnet4_kadt?:
/usr/src/ipset/kernel/net/netfilter/ipset/ip_set_hash_netnet.c:141:
error: unknown field ?cidr? specified in initializer

Reported-by: Husnu Demir <hdemir@metu.edu.tr>
11 years agoUse dev_net() instead of the direct access to ->nd_net
Jozsef Kadlecsik [Fri, 4 Oct 2013 19:59:39 +0000 (21:59 +0200)]
Use dev_net() instead of the direct access to ->nd_net

We have to use dev_net() instead of the direct access to ->nd_net,
otherwise compilation fails if NET_NS is not enabled. Reported by
the kbuild test robot.

11 years agoipset 6.20 released v6.20
Jozsef Kadlecsik [Wed, 2 Oct 2013 20:53:23 +0000 (22:53 +0200)]
ipset 6.20 released

11 years agoMissing comment support added to hash:ip,port,ip and hash:net,iface types
Jozsef Kadlecsik [Wed, 2 Oct 2013 20:40:34 +0000 (22:40 +0200)]
Missing comment support added to hash:ip,port,ip and hash:net,iface types

11 years agoCompatibility code is modified not to rely on kernel version numbers
Jozsef Kadlecsik [Wed, 2 Oct 2013 15:31:15 +0000 (17:31 +0200)]
Compatibility code is modified not to rely on kernel version numbers

Instead the kernel source code is checked to verify the different
compatibility issues for the supported kernel releases.

This way hopefully backported features will be handled properly.

11 years agoUse netlink callback dump args only
Jozsef Kadlecsik [Wed, 2 Oct 2013 06:13:18 +0000 (08:13 +0200)]
Use netlink callback dump args only

Instead of cb->data, use callback dump args only and introduce symbolic
names instead of plain numbers at accessing the argument members.

11 years agoipset: Add userspace code to support hash:net,port,net kernel module.
Oliver Smith [Sat, 28 Sep 2013 18:20:01 +0000 (20:20 +0200)]
ipset: Add userspace code to support hash:net,port,net kernel module.

This adds the userspace library, tests to validate correct operation of
the module and also provides appropriate usage information in the man
page.

Signed-off-by: Oliver Smith <oliver@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agonetfilter: ipset: Add hash:net,port,net module to kernel.
Oliver Smith [Sat, 28 Sep 2013 18:33:23 +0000 (20:33 +0200)]
netfilter: ipset: Add hash:net,port,net module to kernel.

This adds a new set that provides similar functionality to ip,port,net
but permits arbitrary size subnets for both the first and last
parameter.

Signed-off-by: Oliver Smith <oliver@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoipset: Add net namespace for ipset
Vitaly Lavrov [Sat, 28 Sep 2013 16:41:20 +0000 (18:41 +0200)]
ipset: Add net namespace for ipset

This patch adds netns support for ipset.

Major changes were made in ip_set_core.c and ip_set.h.
Global variables are moved to per net namespace.
Added initialization code and the destruction of the network namespace ipset subsystem.
In the prototypes of public functions ip_set_* added parameter "struct net*".

The remaining corrections related to the change prototypes of public functions ip_set_*.

The patch for git://git.netfilter.org/ipset.git commit 6a4ec96c0b8caac5c35474e40e319704d92ca347

Signed-off-by: Vitaly Lavrov <lve@guap.ru>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoUse a common function at listing the extensions of the elements
Jozsef Kadlecsik [Wed, 25 Sep 2013 15:44:35 +0000 (17:44 +0200)]
Use a common function at listing the extensions of the elements

11 years agoTests added to check comment extension
Jozsef Kadlecsik [Tue, 24 Sep 2013 15:20:26 +0000 (17:20 +0200)]
Tests added to check comment extension

11 years agoFor set:list types, replaced elements must be zeroed out
Jozsef Kadlecsik [Mon, 23 Sep 2013 19:28:06 +0000 (21:28 +0200)]
For set:list types, replaced elements must be zeroed out

The new extensions require zero initialization for the new element
to be added into a slot from where another element was pushed away.

11 years agoFix hash resizing with comments
Jozsef Kadlecsik [Mon, 23 Sep 2013 15:45:21 +0000 (17:45 +0200)]
Fix hash resizing with comments

The destroy function must take into account that resizing doesn't
create new extensions so those cannot be destroyed at resize.

11 years agoipset: Add new userspace set revisions for comment support
Oliver Smith [Sun, 22 Sep 2013 18:56:36 +0000 (20:56 +0200)]
ipset: Add new userspace set revisions for comment support

This introduces new revisions of all hash and bitmap ipsets to
complement the comment functionality introduced into the kernel modules.

Currently all sets have a compile-time limit of 255 characters including
\0. This can otherwise be arbitrarily modified.

Signed-off-by: Oliver Smith <oliver@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoipset: Support comments in the userspace library.
Oliver Smith [Sun, 22 Sep 2013 18:56:35 +0000 (20:56 +0200)]
ipset: Support comments in the userspace library.

This adds support to the userspace portion of ipset for handling ipsets
with the comment extension enabled. The library revision has been raised
accordingly.

Signed-off-by: Oliver Smith <oliver@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoipset: Rework the "fake" argument parsing for ipset restore.
Oliver Smith [Sun, 22 Sep 2013 18:56:34 +0000 (20:56 +0200)]
ipset: Rework the "fake" argument parsing for ipset restore.

This reworks the argument parsing functionality of ipset to handle
quote-delimited lines in such a way that they are considered to be a
single argument.

This commit is necessary for ipset to successfully restore sets that
have comments.

Signed-off-by: Oliver Smith <oliver@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agonetfilter: ipset: Support comments in the list-type ipset.
Oliver Smith [Sun, 22 Sep 2013 18:56:33 +0000 (20:56 +0200)]
netfilter: ipset: Support comments in the list-type ipset.

This provides kernel support for creating list ipsets with the comment
annotation extension.

Signed-off-by: Oliver Smith <oliver@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agonetfilter: ipset: Support comments in bitmap-type ipsets.
Oliver Smith [Sun, 22 Sep 2013 18:56:32 +0000 (20:56 +0200)]
netfilter: ipset: Support comments in bitmap-type ipsets.

This provides kernel support for creating bitmap ipsets with comment
support.

As is the case for hashes, this incurs a penalty when flushing or
destroying the entire ipset as the entries must first be walked in order
to free the comment strings. This penalty is of course far less than the
cost of listing an ipset to userspace. Any set created without support
for comments will be flushed/destroyed as before.

Signed-off-by: Oliver Smith <oliver@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agonetfilter: ipset: Support comments in hash-type ipsets.
Oliver Smith [Sun, 22 Sep 2013 18:56:31 +0000 (20:56 +0200)]
netfilter: ipset: Support comments in hash-type ipsets.

This provides kernel support for creating ipsets with comment support.

This does incur a penalty to flushing/destroying an ipset since all
entries are walked in order to free the allocated strings, this penalty
is of course less expensive than the operation of listing an ipset to
userspace, so for general-purpose usage the overall impact is expected
to be little to none.

Signed-off-by: Oliver Smith <oliver@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agonetfilter: ipset: Support comments for ipset entries in the core.
Oliver Smith [Sun, 22 Sep 2013 18:56:30 +0000 (20:56 +0200)]
netfilter: ipset: Support comments for ipset entries in the core.

This adds the core support for having comments on ipset entries.

The comments are stored as standard null-terminated strings in
dynamically allocated memory after being passed to the kernel. As a
result of this, code has been added to the generic destroy function to
iterate all extensions and call that extension's destroy task if the set
has that extension activated, and if such a task is defined.

Signed-off-by: Oliver Smith <oliver@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoipset: Add userspace code to support hash:net,net kernel module.
Oliver Smith [Fri, 20 Sep 2013 08:13:54 +0000 (10:13 +0200)]
ipset: Add userspace code to support hash:net,net kernel module.

This adds the userspace library, tests to validate correct operation of
the module and also provides appropriate usage information in the man
page. The library version has been bumped accordingly.

Signed-off-by: Oliver Smith <oliver@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agonetfilter: ipset: Add hash:net,net module to kernel.
Oliver Smith [Fri, 20 Sep 2013 08:13:53 +0000 (10:13 +0200)]
netfilter: ipset: Add hash:net,net module to kernel.

This adds a new set that provides the ability to configure pairs of
subnets. A small amount of additional handling code has been added to
the generic hash header file - this code is conditionally activated by a
preprocessor definition.

Signed-off-by: Oliver Smith <oliver@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoKconfig: ipset needs NETFILTER_NETLINK
Jozsef Kadlecsik [Tue, 17 Sep 2013 08:32:58 +0000 (10:32 +0200)]
Kconfig: ipset needs NETFILTER_NETLINK

NETFILTER_NETLINK is not selectable in recent kernels, check and warn
if not enabled indirectly.

11 years agoAdd test to verify CIDR tracking
Jozsef Kadlecsik [Sun, 15 Sep 2013 13:11:17 +0000 (15:11 +0200)]
Add test to verify CIDR tracking

11 years agonetfilter: ipset: Fix serious failure in CIDR tracking
Oliver Smith [Sat, 14 Sep 2013 09:05:53 +0000 (11:05 +0200)]
netfilter: ipset: Fix serious failure in CIDR tracking

This fixes a serious bug affecting all hash types with a net element -
specifically, if a CIDR value is deleted such that none of the same size
exist any more, all larger (less-specific) values will then fail to
match. Adding back any prefix with a CIDR equal to or more specific than
the one deleted will fix it.

Steps to reproduce:
ipset -N test hash:net
ipset -A test 1.1.0.0/16
ipset -A test 2.2.2.0/24
ipset -T test 1.1.1.1 #1.1.1.1 IS in set
ipset -D test 2.2.2.0/24
ipset -T test 1.1.1.1 #1.1.1.1 IS NOT in set

This is due to the fact that the nets counter was unconditionally
decremented prior to the iteration that shifts up the entries. Now, we
first check if there is a proceeding entry and if not, decrement it and
return. Otherwise, we proceed to iterate and then zero the last element,
which, in most cases, will already be zero.

Signed-off-by: Oliver Smith <oliver@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoconfigure: uclinux is also linux
Gustavo Zacarias [Tue, 10 Sep 2013 19:23:27 +0000 (16:23 -0300)]
configure: uclinux is also linux

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agolist:set: make sure all elements are checked by the gc
Jozsef Kadlecsik [Mon, 9 Sep 2013 15:10:20 +0000 (17:10 +0200)]
list:set: make sure all elements are checked by the gc

When an element timed out, the next one was skipped by the garbage
collector, fixed.

11 years agoSupport extensions which need a per data destroy function
Jozsef Kadlecsik [Mon, 9 Sep 2013 12:44:29 +0000 (14:44 +0200)]
Support extensions which need a per data destroy function

11 years agoGeneralize extensions support
Jozsef Kadlecsik [Fri, 6 Sep 2013 22:43:52 +0000 (00:43 +0200)]
Generalize extensions support

Get rid of the structure based extensions and introduce a blob for
the extensions. Thus we can support more extension types easily.

11 years agoMove extension data to set structure
Jozsef Kadlecsik [Fri, 6 Sep 2013 22:10:07 +0000 (00:10 +0200)]
Move extension data to set structure

Default timeout and extension offsets are moved to struct set, because
all set types supports all extensions and it makes possible to generalize
extension support.

11 years agoRename extension offset ids to extension ids
Jozsef Kadlecsik [Fri, 6 Sep 2013 20:31:40 +0000 (22:31 +0200)]
Rename extension offset ids to extension ids

11 years agoPrepare ipset to support multiple networks for hash types
Jozsef Kadlecsik [Wed, 4 Sep 2013 14:56:12 +0000 (16:56 +0200)]
Prepare ipset to support multiple networks for hash types

In order to support hash:net,net, hash:net,port,net etc. types,
arrays are introduced for the book-keeping of existing cidr sizes
and network numbers in a set.

11 years agoIntroduce new operation to get both setname and family
Jozsef Kadlecsik [Wed, 4 Sep 2013 14:49:08 +0000 (16:49 +0200)]
Introduce new operation to get both setname and family

ip[6]tables set match and SET target need to know the family of the set
in order to reject adding rules which refer to a set with a non-mathcing
family. Currently such rules are silently accepted and then ignored
instead of generating a clear error message to the user, which is not
helpful.

11 years agoAdd specifying protocol for bitmap:port
Quentin Armitage [Fri, 9 Aug 2013 11:26:33 +0000 (12:26 +0100)]
Add specifying protocol for bitmap:port

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoRemove artifical restriction of netmask values for hash:ip type.
Jozsef Kadlecsik [Sat, 17 Aug 2013 19:12:53 +0000 (21:12 +0200)]
Remove artifical restriction of netmask values for hash:ip type.

Reported by Quentin Armitage, closes netfilter bugzilla id #844.

11 years agoMake sure called test scripts can be executed (reported by Tomas Budai)
Jozsef Kadlecsik [Fri, 16 Aug 2013 21:25:58 +0000 (23:25 +0200)]
Make sure called test scripts can be executed (reported by Tomas Budai)

11 years agoManpage fix: not just identical, but compatible type of sets can be swapped
Jozsef Kadlecsik [Wed, 14 Aug 2013 14:10:34 +0000 (16:10 +0200)]
Manpage fix: not just identical, but compatible type of sets can be swapped

Reported by Quentin Armitage, netfilter bugzilla id #843.

11 years agoValidate the set family and not the set type family at swapping.
Jozsef Kadlecsik [Wed, 14 Aug 2013 14:07:49 +0000 (16:07 +0200)]
Validate the set family and not the set type family at swapping.

Bug reported by Quentin Armitage, netfilter bugzilla id #843.

11 years agoFix error message typo
Jozsef Kadlecsik [Wed, 14 Aug 2013 13:59:54 +0000 (15:59 +0200)]
Fix error message typo

Reported by Quentin Armitage, netfilter bugzilla id #843.

11 years agoParse option "family" first, because other options may depend on it
Jozsef Kadlecsik [Wed, 14 Aug 2013 13:41:20 +0000 (15:41 +0200)]
Parse option "family" first, because other options may depend on it

Option like "netmask" depends on the INET family, so parse "family"
first, then the rest of the options.

Bug reported by Quentin Armitage, closed netfilter bugzilla #841.

11 years agoChange 2nd parameter type of ipset_parse_elem
Quentin Armitage [Thu, 1 Aug 2013 21:17:03 +0000 (23:17 +0200)]
Change 2nd parameter type of ipset_parse_elem

The only place in ipset where ipset_parse_elem is called is src/ipset.c. The
second parameter to the function call is type->last_elem_optional, which is of
type bool, but ipset_parse_elem is defined in lib/parse.c with the second
parameter having type enum ipset_opt.

The use in lib/parse.c is clearly as a bool.

11 years agoConsistent userspace testing with nomatch flag
Jozsef Kadlecsik [Sat, 20 Jul 2013 14:44:42 +0000 (16:44 +0200)]
Consistent userspace testing with nomatch flag

The "nomatch" commandline flag should invert the matching at testing,
similarly to the --return-nomatch flag of the "set" match of iptables.
Until now it worked with the elements with "nomatch" flag only. From
now on it works with elements without the flag too, i.e:

 # ipset n test hash:net
 # ipset a test 10.0.0.0/24 nomatch
 # ipset t test 10.0.0.1
 10.0.0.1 is NOT in set test.
 # ipset t test 10.0.0.1 nomatch
 10.0.0.1 is in set test.

 # ipset a test 192.168.0.0/24
 # ipset t test 192.168.0.1
 192.168.0.1 is in set test.
 # ipset t test 192.168.0.1 nomatch
 192.168.0.1 is NOT in set test.

 Before the patch the results were

 ...
 # ipset t test 192.168.0.1
 192.168.0.1 is in set test.
 # ipset t test 192.168.0.1 nomatch
 192.168.0.1 is in set test.

11 years agoReport broken netlink messages in debug mode
Jozsef Kadlecsik [Fri, 19 Jul 2013 19:54:02 +0000 (21:54 +0200)]
Report broken netlink messages in debug mode

11 years agoSkip really non-first fragments for IPv6 when getting port/protocol
Jozsef Kadlecsik [Fri, 31 May 2013 21:14:36 +0000 (23:14 +0200)]
Skip really non-first fragments for IPv6 when getting port/protocol

11 years agoipset standalone package needs to ship em_ipset.c
Jozsef Kadlecsik [Fri, 31 May 2013 20:52:54 +0000 (22:52 +0200)]
ipset standalone package needs to ship em_ipset.c

Due to the ipset kernel API changes, em_ipset.c needs to be provided
in the ipset package, reported by Jan Engelhardt:

WARNING: //lib/modules/3.7.10-jng15-default/kernel/net/sched/em_ipset.ko
disagrees about version of symbol ip_set_test

11 years agoipset: Fix hyphen used as minus sign in manpage
Neutron Soutmun [Sun, 12 May 2013 09:30:57 +0000 (16:30 +0700)]
ipset: Fix hyphen used as minus sign in manpage

Signed-off-by: Neutron Soutmun <neo.neutron@gmail.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agolibipset.pc must be installed via 'make install'
Eric Leblond [Fri, 10 May 2013 20:25:17 +0000 (22:25 +0200)]
libipset.pc must be installed via 'make install'

libipset.pc was not installed by classic 'make install'. This
patch adds it to the list of installed files.

Signed-off-by: Eric Leblond <eric@regit.org>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoipset 6.19 released v6.19
Jozsef Kadlecsik [Thu, 9 May 2013 15:33:39 +0000 (17:33 +0200)]
ipset 6.19 released

11 years agoCompatibility fixes to keep the support of kernels back to 2.6.32
Jozsef Kadlecsik [Thu, 9 May 2013 15:31:15 +0000 (17:31 +0200)]
Compatibility fixes to keep the support of kernels back to 2.6.32

11 years agoCheck at modules_install whether depmod ignores the extra subdir
Jozsef Kadlecsik [Thu, 9 May 2013 09:49:40 +0000 (11:49 +0200)]
Check at modules_install whether depmod ignores the extra subdir

The external kernel modules are installed in the extra subdir in
/lib/modules/<kernelrelease>/, but depmod in some distributions
(at least in Ubuntu 12.04 LTS) ingores the subdir. Warn about it,
because that way the modules are actually not available there.

Reported by Husnu Demir and tian fang.

11 years agoBackport nla_put_net64
Jozsef Kadlecsik [Thu, 9 May 2013 09:49:16 +0000 (11:49 +0200)]
Backport nla_put_net64

11 years agoThe utils are updated from their sources
Jozsef Kadlecsik [Tue, 7 May 2013 20:11:12 +0000 (22:11 +0200)]
The utils are updated from their sources

11 years agoSupport package fragments for IPv4 protos without ports
Anders K. Pedersen [Fri, 3 May 2013 21:15:48 +0000 (23:15 +0200)]
Support package fragments for IPv4 protos without ports

Enable ipset port set types to match IPv4 package fragments for
protocols that doesn't have ports (or the port information isn't
supported by ipset).

For example this allows a hash:ip,port ipset containing the entry
192.168.0.1,gre:0 to match all package fragments for PPTP VPN tunnels
to/from the host. Without this patch only the first package fragment
(with fragment offset 0) was matched, while subsequent fragments wasn't.

This is not possible for IPv6, where the protocol is in the fragmented
part of the package unlike IPv4, where the protocol is in the IP header.

IPPROTO_ICMPV6 is deliberately not included, because it isn't relevant
for IPv4.

Signed-off-by: Anders K. Pedersen <akp@surftown.com>
11 years agoManpage typing error correction (reported by Husnu Demir)
Jozsef Kadlecsik [Thu, 2 May 2013 11:37:33 +0000 (13:37 +0200)]
Manpage typing error correction (reported by Husnu Demir)

11 years agoUpdate testsuite as the trailing space was eliminated at listings
Jozsef Kadlecsik [Thu, 2 May 2013 09:36:06 +0000 (11:36 +0200)]
Update testsuite as the trailing space was eliminated at listings

11 years agoUse fix sized type for timeout in the extension part
Jozsef Kadlecsik [Thu, 2 May 2013 08:52:27 +0000 (10:52 +0200)]
Use fix sized type for timeout in the extension part

11 years agoAdd sparse checking support to userspace
Jozsef Kadlecsik [Thu, 2 May 2013 08:51:55 +0000 (10:51 +0200)]
Add sparse checking support to userspace

11 years agoImprove XML output: add element tag and root element (suggested by Lucas Hamie)
Jozsef Kadlecsik [Wed, 1 May 2013 17:50:41 +0000 (19:50 +0200)]
Improve XML output: add element tag and root element (suggested by Lucas Hamie)

11 years agoMake sure kernel configured properly for sparse checkings
Jozsef Kadlecsik [Wed, 1 May 2013 16:48:27 +0000 (18:48 +0200)]
Make sure kernel configured properly for sparse checkings

11 years agoFix "may be used uninitialized" warnings
Jozsef Kadlecsik [Wed, 1 May 2013 16:47:32 +0000 (18:47 +0200)]
Fix "may be used uninitialized" warnings

Reported-by: Pablo Neira Ayuso <pablo@netfilter.org>
11 years agoRename simple macro names to avoid namespace issues.
Jozsef Kadlecsik [Tue, 30 Apr 2013 21:02:43 +0000 (23:02 +0200)]
Rename simple macro names to avoid namespace issues.

Reported-by: David Laight <David.Laight@ACULAB.COM>
11 years agoFix sparse warnings due to missing rcu annotations
Jozsef Kadlecsik [Tue, 30 Apr 2013 19:23:18 +0000 (21:23 +0200)]
Fix sparse warnings due to missing rcu annotations

Reported-by: Pablo Neira Ayuso <pablo@netfilter.org>
11 years agoSparse warning about shadowed variable fixed
Jozsef Kadlecsik [Tue, 30 Apr 2013 16:40:43 +0000 (18:40 +0200)]
Sparse warning about shadowed variable fixed

net/netfilter/ipset/ip_set_hash_ipportnet.c:275:20:
warning: symbol 'cidr' shadows an earlier one

11 years agoDon't call ip_nest_end needlessly in the error path
Jozsef Kadlecsik [Sat, 27 Apr 2013 19:02:59 +0000 (21:02 +0200)]
Don't call ip_nest_end needlessly in the error path

Suggested-by: Pablo Neira Ayuso <pablo@netfilter.org>
11 years agoManpage updates
Jozsef Kadlecsik [Fri, 5 Apr 2013 14:55:02 +0000 (16:55 +0200)]
Manpage updates

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoAdd new testsuite entries to verify counters and the new type implementations
Jozsef Kadlecsik [Thu, 4 Apr 2013 14:32:20 +0000 (16:32 +0200)]
Add new testsuite entries to verify counters and the new type implementations

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoIntroduce the new set type revisions with counter support
Jozsef Kadlecsik [Tue, 9 Apr 2013 15:17:50 +0000 (17:17 +0200)]
Introduce the new set type revisions with counter support

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoSupport counters in the ipset library
Jozsef Kadlecsik [Tue, 9 Apr 2013 15:17:00 +0000 (17:17 +0200)]
Support counters in the ipset library

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoset match: add support to match the counters
Jozsef Kadlecsik [Tue, 9 Apr 2013 15:14:19 +0000 (17:14 +0200)]
set match: add support to match the counters

The new revision of the set match supports to match the counters
and to suppress updating the counters at matching too.

At the set:list types, the updating of the subcounters can be
suppressed as well.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoThe list:set type with counter support
Jozsef Kadlecsik [Mon, 8 Apr 2013 21:11:32 +0000 (23:11 +0200)]
The list:set type with counter support

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoThe hash types with counter support
Jozsef Kadlecsik [Mon, 8 Apr 2013 21:11:02 +0000 (23:11 +0200)]
The hash types with counter support

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoThe bitmap types with counter support
Jozsef Kadlecsik [Mon, 8 Apr 2013 21:10:22 +0000 (23:10 +0200)]
The bitmap types with counter support

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoIntroduce the counter extension in the core
Jozsef Kadlecsik [Mon, 8 Apr 2013 21:09:19 +0000 (23:09 +0200)]
Introduce the counter extension in the core

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agolist:set type using the extension interface
Jozsef Kadlecsik [Thu, 4 Apr 2013 10:21:02 +0000 (12:21 +0200)]
list:set type using the extension interface

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoHash types using the unified code base
Jozsef Kadlecsik [Mon, 8 Apr 2013 20:50:55 +0000 (22:50 +0200)]
Hash types using the unified code base

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoUnified hash type generation
Jozsef Kadlecsik [Mon, 8 Apr 2013 19:05:44 +0000 (21:05 +0200)]
Unified hash type generation

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoBitmap types using the unified code base
Jozsef Kadlecsik [Mon, 8 Apr 2013 19:03:26 +0000 (21:03 +0200)]
Bitmap types using the unified code base

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoUnified bitmap type generation
Jozsef Kadlecsik [Mon, 8 Apr 2013 19:00:52 +0000 (21:00 +0200)]
Unified bitmap type generation

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoIntroduce extensions to elements in the core
Jozsef Kadlecsik [Mon, 8 Apr 2013 18:59:15 +0000 (20:59 +0200)]
Introduce extensions to elements in the core

Introduce extensions to elements in the core and prepare timeout as
the first one.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoMove often used IPv6 address masking function to header file
Jozsef Kadlecsik [Mon, 8 Apr 2013 18:54:37 +0000 (20:54 +0200)]
Move often used IPv6 address masking function to header file

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoMake possible to test elements marked with nomatch, from userspace
Jozsef Kadlecsik [Mon, 8 Apr 2013 19:51:25 +0000 (21:51 +0200)]
Make possible to test elements marked with nomatch, from userspace

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agonetfilter ipset: Use ipv6_addr_equal() where appropriate.
YOSHIFUJI Hideaki [Sat, 6 Apr 2013 12:10:06 +0000 (14:10 +0200)]
netfilter ipset: Use ipv6_addr_equal() where appropriate.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoAdd a compatibility header file for easier maintenance
Jozsef Kadlecsik [Sat, 6 Apr 2013 12:04:12 +0000 (14:04 +0200)]
Add a compatibility header file for easier maintenance

Unfortunately not everything could be moved there, there are still
compatibility ifdefs in some other files.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoThe uapi include split in the package itself
Jozsef Kadlecsik [Sat, 6 Apr 2013 07:52:33 +0000 (09:52 +0200)]
The uapi include split in the package itself

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoReorder modules a little bit in Kbuild
Jozsef Kadlecsik [Mon, 1 Apr 2013 19:17:58 +0000 (21:17 +0200)]
Reorder modules a little bit in Kbuild

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agohash:*net*: nomatch flag not excluded on set resize
Jozsef Kadlecsik [Mon, 1 Apr 2013 19:13:20 +0000 (21:13 +0200)]
hash:*net*: nomatch flag not excluded on set resize

If a resize is triggered the nomatch flag is not excluded at hashing,
which leads to the element missed at lookup in the resized set.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agolist:set: update reference counter when last element pushed off
Jozsef Kadlecsik [Mon, 1 Apr 2013 18:11:01 +0000 (20:11 +0200)]
list:set: update reference counter when last element pushed off

The last element can be replaced or pushed off and in both
cases the reference counter must be updated.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
11 years agoipset 6.17 released v6.17
Jozsef Kadlecsik [Thu, 21 Feb 2013 15:44:09 +0000 (16:44 +0100)]
ipset 6.17 released

11 years agoThe ipset_list tool is added
Jozsef Kadlecsik [Thu, 21 Feb 2013 15:37:41 +0000 (16:37 +0100)]
The ipset_list tool is added

Source: http://sourceforge.net/projects/ipset-list

11 years agoThe ipset_bash_completion tool is added
Jozsef Kadlecsik [Thu, 21 Feb 2013 15:36:35 +0000 (16:36 +0100)]
The ipset_bash_completion tool is added

Source: http://sourceforge.net/projects/ipset-bashcompl

11 years agoInteractive mode error after syntax error (reported by Mart Frauenlob)
Jozsef Kadlecsik [Thu, 21 Feb 2013 11:08:42 +0000 (12:08 +0100)]
Interactive mode error after syntax error (reported by Mart Frauenlob)

ipset> list foo
ipset v6.16.1: The set with the given name does not exist
ipset> -t
No command specified
ipset> list
ipset v6.16.1: Internal protocol error

In interactive mode the state was not cleaned up properly after a
syntax error, fixed.

11 years ago"Directory not empty" error message (reported by John Brendler)
Jozsef Kadlecsik [Thu, 21 Feb 2013 10:12:40 +0000 (11:12 +0100)]
"Directory not empty" error message (reported by John Brendler)

When an entry flagged with "nomatch" was tested by ipset, it
returned the error message "Kernel error received:
Directory not empty" instead of "<element> is NOT in set <setname>".

The internal error code was not properly transformed before returning
to userspace, fixed.