]> granicus.if.org Git - ipset/log
ipset
13 years agoFix wrong kzalloc flag in type_pf_expire
Jozsef Kadlecsik [Thu, 20 Jan 2011 17:55:48 +0000 (18:55 +0100)]
Fix wrong kzalloc flag in type_pf_expire

The expire functions of the hash types are called while locked, so
kzalloc must be called with GFP_ATOMIC.

13 years agoThe get_ip*_port functions are too large to be inlined, moved into the core.
Jozsef Kadlecsik [Thu, 20 Jan 2011 17:51:54 +0000 (18:51 +0100)]
The get_ip*_port functions are too large to be inlined, moved into the core.

13 years agoAdd missing __GFP_HIGHMEM flag to __vmalloc
Jozsef Kadlecsik [Thu, 20 Jan 2011 17:19:31 +0000 (18:19 +0100)]
Add missing __GFP_HIGHMEM flag to __vmalloc

We may call ip_set_alloc with GFP_ATOMIC, so we cannot replace __vmalloc
with vzalloc. Missing flag was noticed by Eric Dumazet.

13 years agoEnforce network-order data in the netlink protocol
Jozsef Kadlecsik [Thu, 20 Jan 2011 16:54:26 +0000 (17:54 +0100)]
Enforce network-order data in the netlink protocol

Allow only network-order data, with NLA_F_NET_BYTEORDER flag.
Sanity checks also added to prevent processing broken messages
where mandatory attributes are missing. (Patrick McHardy's review)

13 years agoUse annotated types and fix sparse warnings
Jozsef Kadlecsik [Thu, 20 Jan 2011 13:48:23 +0000 (14:48 +0100)]
Use annotated types and fix sparse warnings

Annotated types are introduced and sparse warnings fixed.
Two warnings remained in ip_set_core.c but those are false ones.
(Patrick McHardy's review)

13 years agoMove ip_set_alloc, ip_set_free and ip_set_get_ipaddr* into core
Jozsef Kadlecsik [Thu, 20 Jan 2011 10:45:37 +0000 (11:45 +0100)]
Move ip_set_alloc, ip_set_free and ip_set_get_ipaddr* into core

The functions are too large to be inlined, so move them into the core.
Also, fix the unnecessary initializations in ip_set_get_ipaddr*.
(Patrick McHardy's review)

13 years agoNETMASK*, HOSTMASK* macros are too generic
Jozsef Kadlecsik [Thu, 20 Jan 2011 10:34:00 +0000 (11:34 +0100)]
NETMASK*, HOSTMASK* macros are too generic

NETMASK*, HOSTMASK* macros are rewritten to small inline functions
ip_set_netmask* and ip_set_hostmask* (Patrick McHardy's review)

13 years agoUse static LIST_HEAD() for ip_set_type_list
Jozsef Kadlecsik [Thu, 20 Jan 2011 09:58:43 +0000 (10:58 +0100)]
Use static LIST_HEAD() for ip_set_type_list

Avoid the need for explicit initialization during runtime
(Patrick McHardy's review)

13 years agoMove NLA_PUT_NET* macros to include/net/netlink.h
Jozsef Kadlecsik [Thu, 20 Jan 2011 09:39:01 +0000 (10:39 +0100)]
Move NLA_PUT_NET* macros to include/net/netlink.h

These macros can be useful in general (Patrick McHardy's review)

13 years agoThe module parameter max_sets should be unsigned int
Jozsef Kadlecsik [Thu, 20 Jan 2011 09:26:44 +0000 (10:26 +0100)]
The module parameter max_sets should be unsigned int

Negative set numbers are strange :-) (Patrick McHardy's review)

13 years agoGet rid of ip_set_kernel.h
Jozsef Kadlecsik [Thu, 20 Jan 2011 09:25:04 +0000 (10:25 +0100)]
Get rid of ip_set_kernel.h

The header file was useful at deep debugging only, we can get rid of now.
(Patrick McHardy's review)

13 years agoFix the placement style of boolean operators at continued lines
Jozsef Kadlecsik [Thu, 20 Jan 2011 09:20:14 +0000 (10:20 +0100)]
Fix the placement style of boolean operators at continued lines

Fix "&&" and "||" continuation style (Patrick McHardy's review)

13 years agoipset 5.3 released v5.3
Jozsef Kadlecsik [Tue, 18 Jan 2011 19:47:44 +0000 (20:47 +0100)]
ipset 5.3 released

13 years agoSet the non-debug compiling the default
Jozsef Kadlecsik [Tue, 18 Jan 2011 19:39:51 +0000 (20:39 +0100)]
Set the non-debug compiling the default

Compiling with debugging can be enabled with the "--enable-debug" option
of the configure script.

13 years agoTestsuite fix of ospf replaced with vrrp.
Jozsef Kadlecsik [Tue, 18 Jan 2011 16:49:55 +0000 (17:49 +0100)]
Testsuite fix of ospf replaced with vrrp.

The testsuite failed incorrectly, because the order of the elements
changed.

13 years agoFix build with NDEBUG defined
Jozsef Kadlecsik [Tue, 18 Jan 2011 16:48:22 +0000 (17:48 +0100)]
Fix build with NDEBUG defined

The usage of the gcc option -Wunused-parameter interferes badly with
the assert() macros.  In case -DNDEBUG is specified build fails with:

  cc1: warnings being treated as errors
  print.c: In function 'ipset_print_family':
  print.c:92: error: unused parameter 'opt'
  print.c: In function 'ipset_print_port':
  print.c:413: error: unused parameter 'opt'
  print.c: In function 'ipset_print_proto':

Fix it by taking into accout NDEBUG in the function arguments.

Bug reported by Holger Eitzenberger.

13 years agoDo session initialization once
Holger Eitzenberger [Tue, 18 Jan 2011 16:30:50 +0000 (17:30 +0100)]
Do session initialization once

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
13 years agoMake IPv4 and IPv6 address handling similar
Jozsef Kadlecsik [Tue, 18 Jan 2011 16:20:30 +0000 (17:20 +0100)]
Make IPv4 and IPv6 address handling similar

While the following works for AF_INET:

 ipset add foo 192.168.1.1/32

this does not work for AF_INET6:

 ipset add foo6 20a1:1:2:3:4:5:6:7/128
 ipset v5.2: Syntax error: plain IP address must be supplied: 20a1:1:2:3:4:5:6:7/128

Bug reported by Holger Eitzenberger.

The complete fix is to handle the special host prefixes in the general
IP address parser function.

13 years agoShow correct line numbers in restore output for parser errors
Jozsef Kadlecsik [Tue, 18 Jan 2011 16:17:46 +0000 (17:17 +0100)]
Show correct line numbers in restore output for parser errors

Parser errors are reported by a wrong lineno at restore, bug reported
by Holger Eitzenberger:

  create foo6 hash:ip hashsize 64 family inet6
  add foo6 20a1:1234:5678::/64
  add foo6 20a1:1234:5679::/64

you get:

  ipset v5.2: Error in line 1: Syntax error: plain IP address must be supplied: 20a1:1234:5678::/64

Should be line 2 though.

The solution is to set the session lineno before parsing.

13 years agoThere is no need to call synchronize_net() at swapping.
Jozsef Kadlecsik [Fri, 14 Jan 2011 18:30:28 +0000 (19:30 +0100)]
There is no need to call synchronize_net() at swapping.

Ongoing add/del can happen to referenced sets and delete can be issued
to unreferenced sets. So the bogus call to synchronize_net() can safely
be removed.

13 years agoReplace strncpy with strlcpy at creating a set.
Jozsef Kadlecsik [Fri, 14 Jan 2011 16:24:38 +0000 (17:24 +0100)]
Replace strncpy with strlcpy at creating a set.

Better add more safety nets against user input.

13 years agoUpdate copyright date and some style changes.
Jozsef Kadlecsik [Fri, 14 Jan 2011 16:16:10 +0000 (17:16 +0100)]
Update copyright date and some style changes.

13 years agoUse jhash.h accepted in kernel, with backward compatibility.
Jozsef Kadlecsik [Thu, 13 Jan 2011 21:01:51 +0000 (22:01 +0100)]
Use jhash.h accepted in kernel, with backward compatibility.

13 years agoSeparate prefixlens from ip_set core.
Jozsef Kadlecsik [Thu, 13 Jan 2011 20:48:17 +0000 (21:48 +0100)]
Separate prefixlens from ip_set core.

Separate prefixlens from ip_set core for better readibility and honoring
the independence.
Also, comment that prefixlens were borrowed from Jan Engelhardt.

13 years agoReplace ospf with vrrp in the testsuite
Jozsef Kadlecsik [Thu, 13 Jan 2011 14:46:26 +0000 (15:46 +0100)]
Replace ospf with vrrp in the testsuite

Some systems do not contain ospf in /etc/protocols but ospfigp only.

13 years agoMerge branch 'master' of git://dev.medozas.de/ipset
Jozsef Kadlecsik [Wed, 12 Jan 2011 12:33:11 +0000 (13:33 +0100)]
Merge branch 'master' of git://dev.medozas.de/ipset

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
14 years agokernel: remove unused ctnl parameter from call_ad
Jan Engelhardt [Mon, 3 Jan 2011 21:32:41 +0000 (22:32 +0100)]
kernel: remove unused ctnl parameter from call_ad

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
14 years agoMerge branch 'master' of git://dev.medozas.de/ipset
Jozsef Kadlecsik [Mon, 3 Jan 2011 09:07:40 +0000 (10:07 +0100)]
Merge branch 'master' of git://dev.medozas.de/ipset

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
14 years agobuild: remove autogenerated files
Jan Engelhardt [Thu, 30 Dec 2010 23:23:25 +0000 (00:23 +0100)]
build: remove autogenerated files

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
14 years agobuild: use only AC_CANONICAL_HOST
Jan Engelhardt [Thu, 30 Dec 2010 23:19:23 +0000 (00:19 +0100)]
build: use only AC_CANONICAL_HOST

Calculating AC_CANONICAL_TARGET is superfluous, because ipset is not a
code generator.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
14 years agoComment the possible return values of the add/del/test type-functions
Jozsef Kadlecsik [Thu, 23 Dec 2010 20:39:12 +0000 (21:39 +0100)]
Comment the possible return values of the add/del/test type-functions

14 years agoipset 5.2 released v5.2
Jozsef Kadlecsik [Thu, 23 Dec 2010 14:48:56 +0000 (15:48 +0100)]
ipset 5.2 released

14 years agoHandle internal printing errors
Jozsef Kadlecsik [Thu, 23 Dec 2010 14:28:28 +0000 (15:28 +0100)]
Handle internal printing errors

Internal printing errors were not reported, handle them by setjmp/longjmp.

14 years agoUse cast to void * instead of memcpy as Sparc workaround at sockaddr_XXX.
Jozsef Kadlecsik [Thu, 23 Dec 2010 13:44:44 +0000 (14:44 +0100)]
Use cast to void * instead of memcpy as Sparc workaround at sockaddr_XXX.

Direct cast results "cast increases required alignment of target type" on
Sparc: use indirect cast to void * instead of memcpy, as Jan Engelhardt
suggested.

14 years agoListing/saving of large sets could produce broken listing, fixed.
Jozsef Kadlecsik [Thu, 23 Dec 2010 13:33:16 +0000 (14:33 +0100)]
Listing/saving of large sets could produce broken listing, fixed.

The wrapper around getnameinfo was not snprintf-compatible and
that could cause broken listing/saving for large sets.

14 years agoKernel version check at minimal supported version is mistyped, now fixed.
Jozsef Kadlecsik [Wed, 22 Dec 2010 20:57:01 +0000 (21:57 +0100)]
Kernel version check at minimal supported version is mistyped, now fixed.

14 years agoSupport libtool < 2.2
Jozsef Kadlecsik [Wed, 22 Dec 2010 20:49:34 +0000 (21:49 +0100)]
Support libtool < 2.2

LT_INIT is not present before libtool 2.2. Revert to use AC_PROG_LIBTOOL.

14 years agoipset 5.1 released v5.1
Jozsef Kadlecsik [Wed, 22 Dec 2010 10:09:20 +0000 (11:09 +0100)]
ipset 5.1 released

14 years agoTest cases for IPv6 restore and more complex restore sessions added.
Jozsef Kadlecsik [Wed, 22 Dec 2010 09:46:26 +0000 (10:46 +0100)]
Test cases for IPv6 restore and more complex restore sessions added.

14 years agoRestore mode did not work for IPv6 (reported by Elie Rosenblum)
Jozsef Kadlecsik [Wed, 22 Dec 2010 09:43:05 +0000 (10:43 +0100)]
Restore mode did not work for IPv6 (reported by Elie Rosenblum)

The set cache stored the default family (INET) instead of the set family,
therefore restore mode for IPv6 did not work. The set cache fixed and
message aggregation reworked.

14 years agoKernel version compatibility: support from 2.6.34
Jozsef Kadlecsik [Tue, 21 Dec 2010 19:47:08 +0000 (20:47 +0100)]
Kernel version compatibility: support from 2.6.34

The basic kernel compatibility issues are verified back to 2.6.24.
The minimal supported kernel version had to be bumped from 2.6.31 to 2.6.34.

14 years agoMerge branch 'master' of git://dev.medozas.de/ipset into ipset-5
Jozsef Kadlecsik [Mon, 20 Dec 2010 10:54:26 +0000 (11:54 +0100)]
Merge branch 'master' of git://dev.medozas.de/ipset into ipset-5

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
14 years agolibipset: static annotations
Jan Engelhardt [Sun, 19 Dec 2010 04:57:52 +0000 (05:57 +0100)]
libipset: static annotations

14 years agolibipset: const annotations
Jan Engelhardt [Sun, 19 Dec 2010 04:56:19 +0000 (05:56 +0100)]
libipset: const annotations

14 years agolibipset: remove redundant casts
Jan Engelhardt [Sun, 19 Dec 2010 02:09:09 +0000 (03:09 +0100)]
libipset: remove redundant casts

14 years agolibipset: remove redundant indirection via union name
Jan Engelhardt [Sun, 19 Dec 2010 02:13:06 +0000 (03:13 +0100)]
libipset: remove redundant indirection via union name

There are no uses of C99 static initializers, so let's make the union
anonymous and reduce accessor lengths.

14 years agolibipset: ipset_strncpy is really a strlcpy-type operation
Jan Engelhardt [Sun, 19 Dec 2010 02:09:56 +0000 (03:09 +0100)]
libipset: ipset_strncpy is really a strlcpy-type operation

14 years agokernel: use EXPORT_SYMBOL_GPL
Jan Engelhardt [Sun, 19 Dec 2010 01:45:54 +0000 (02:45 +0100)]
kernel: use EXPORT_SYMBOL_GPL

14 years agokernel: const annotations
Jan Engelhardt [Sun, 19 Dec 2010 01:44:14 +0000 (02:44 +0100)]
kernel: const annotations

14 years agokernel: use __read_mostly for registration-type structures
Jan Engelhardt [Sun, 19 Dec 2010 01:48:32 +0000 (02:48 +0100)]
kernel: use __read_mostly for registration-type structures

Here is where __read_mostly goes :-)

14 years agokernel: do not mix const and __read_mostly
Jan Engelhardt [Sun, 19 Dec 2010 01:09:19 +0000 (02:09 +0100)]
kernel: do not mix const and __read_mostly

It makes no sense to mix these two. Either it is
writable-plus-read-mostly, or it is constant.

14 years agoxt_set: avoid user types in exported kernel headers
Jan Engelhardt [Sun, 19 Dec 2010 01:27:53 +0000 (02:27 +0100)]
xt_set: avoid user types in exported kernel headers

Within isolated code it would be ok, but not so in exported headers.

14 years agobuild: enable parallel building
Jan Engelhardt [Sun, 19 Dec 2010 01:39:32 +0000 (02:39 +0100)]
build: enable parallel building

$ make modules -j8
cd kernel; make -C /lib/modules/`uname -r`/build M=`pwd` V=0 \
                        IP_SET_MAX=256 \
                        NETLINK_DUMP_CONST=const \
                        NFNL_CB_CONST=const modules
make[1]: Entering directory "/usr/src/linux-2.6.36-rc8-34-obj/x86_64/default"
make[1]: warning: jobserver unavailable: using -j1.
Add '+' to parent make rule.

The "fix" here is that we have to use ${MAKE} instead of make.
(NB: The extra cd is redundant and can be appended to M=.)

14 years agoPrevent calling Makefile directly in the kernel/ subdirectory
Jozsef Kadlecsik [Sat, 18 Dec 2010 23:56:03 +0000 (00:56 +0100)]
Prevent calling Makefile directly in the kernel/ subdirectory

14 years agoPut back the Sparc specific workaround at getaddrinfo.
Jozsef Kadlecsik [Sat, 18 Dec 2010 23:42:03 +0000 (00:42 +0100)]
Put back the Sparc specific workaround at getaddrinfo.

14 years agoShould have gone to sleep: fix check_allowed. Really.
Jozsef Kadlecsik [Sat, 18 Dec 2010 23:38:32 +0000 (00:38 +0100)]
Should have gone to sleep: fix check_allowed. Really.

It's not as nice as I'd like to be: IPSET_CREATE_FLAGS and
IPSET_ADT_FLAGS are required elsewhere, but to make life
simpler, some flags (like IPSET_OPT_TYPENAME) are *not*
added to the types full[] flags. So those must be excluded here.

14 years agoCheck old system kernel header files
Jozsef Kadlecsik [Sat, 18 Dec 2010 22:32:30 +0000 (23:32 +0100)]
Check old system kernel header files

14 years agoCheck from `configure` that the kernel source is patched with netlink.patch
Jozsef Kadlecsik [Sat, 18 Dec 2010 22:02:48 +0000 (23:02 +0100)]
Check from `configure` that the kernel source is patched with netlink.patch

14 years agoUse configure to detect compiler warning flags
Jozsef Kadlecsik [Sat, 18 Dec 2010 21:54:49 +0000 (22:54 +0100)]
Use configure to detect compiler warning flags

By checking the supported compiler warning flags, different gcc releases
are supported without the crude --disable-extra-flags option.

14 years agoThe fix of incorrect comparison in check_allowed completed.
Jozsef Kadlecsik [Sat, 18 Dec 2010 11:34:16 +0000 (12:34 +0100)]
The fix of incorrect comparison in check_allowed completed.

There was still some other incorrect usage of 'enum ipset_cmd' and
'enum ipset_adt' - corrected.

14 years agoTry to solve PKG_CHECK_MODULES issue
Jozsef Kadlecsik [Sat, 18 Dec 2010 10:48:49 +0000 (11:48 +0100)]
Try to solve PKG_CHECK_MODULES issue

Rob Sterenborg reported, that on CentOs configure can fail with

./configure: line 11510: syntax error near unexpected token `[libmnl],'
./configure: line 11510: `PKG_CHECK_MODULES([libmnl], [libmnl >= 1])'

Therefore I added 'aclocal -I m4' to autogen.sh, hoping that it solves
the issue.

14 years agoFix incorrect comparison in check_allowed
Jozsef Kadlecsik [Sat, 18 Dec 2010 10:30:29 +0000 (11:30 +0100)]
Fix incorrect comparison in check_allowed

Wrong enum type was used in the comparison, reported by Jan Engelhardt.

14 years agoFix Kbuild for me to delete backup files
Jozsef Kadlecsik [Fri, 17 Dec 2010 21:45:13 +0000 (22:45 +0100)]
Fix Kbuild for me to delete backup files

14 years agoInitialize ChangeLog for the new release v5.0
Jozsef Kadlecsik [Fri, 17 Dec 2010 21:32:09 +0000 (22:32 +0100)]
Initialize ChangeLog for the new release

14 years agoAdd tests to check hash:ip,port,net type
Jozsef Kadlecsik [Fri, 17 Dec 2010 21:10:01 +0000 (22:10 +0100)]
Add tests to check hash:ip,port,net type

14 years agoMatch command prefixes
Jozsef Kadlecsik [Fri, 17 Dec 2010 20:43:18 +0000 (21:43 +0100)]
Match command prefixes

Match not only the first letter or the full command name, but
an arbitrary prefix too.

14 years agoAdd more test to check adding/deleting multiple entries.
Jozsef Kadlecsik [Fri, 17 Dec 2010 20:34:20 +0000 (21:34 +0100)]
Add more test to check adding/deleting multiple entries.

14 years agoUpdated manpage to reflect wider input possibilities in the ipset tool.
Jozsef Kadlecsik [Fri, 17 Dec 2010 20:33:07 +0000 (21:33 +0100)]
Updated manpage to reflect wider input possibilities in the ipset tool.

14 years agoUpdated help texts for the hash:ip and list:set types.
Jozsef Kadlecsik [Fri, 17 Dec 2010 20:32:29 +0000 (21:32 +0100)]
Updated help texts for the hash:ip and list:set types.

14 years agoSupport adding/deleting multiple entries, userspace part.
Jozsef Kadlecsik [Fri, 17 Dec 2010 20:31:12 +0000 (21:31 +0100)]
Support adding/deleting multiple entries, userspace part.

Support adding/deleting multiple entries in the userspace part
of the hash:ip,port, hash:ip,port,ip, hash:ip,port,net and
hash:net,port types.

14 years agoSupport adding/deleting multiple entries, kernel part.
Jozsef Kadlecsik [Fri, 17 Dec 2010 20:28:18 +0000 (21:28 +0100)]
Support adding/deleting multiple entries, kernel part.

Support adding/deleting multiple entries in the kernel side
of the hash:ip,port, hash:ip,port,ip, hash:ip,port,net and
hash:net,port types.

14 years agoAdd ipset_parse_tcpudp_port function
Jozsef Kadlecsik [Fri, 17 Dec 2010 20:26:43 +0000 (21:26 +0100)]
Add ipset_parse_tcpudp_port function

Add new parser function to parse TCP/UDP port name, number, or range of them.

14 years agoMissing spaces in error strings fixed.
Jozsef Kadlecsik [Fri, 17 Dec 2010 10:52:30 +0000 (11:52 +0100)]
Missing spaces in error strings fixed.

14 years agoUse the 'full' flags of the types and check not allowed flags.
Jozsef Kadlecsik [Fri, 17 Dec 2010 10:45:26 +0000 (11:45 +0100)]
Use the 'full' flags of the types and check not allowed flags.

14 years agoRemove unnecessary gfp_flags arguments
Jozsef Kadlecsik [Thu, 16 Dec 2010 11:34:49 +0000 (12:34 +0100)]
Remove unnecessary gfp_flags arguments

Where the argument was used, the set lock was already activated, therefore
the argument value was always GFP_ATOMIC.

14 years agoAdd test to check multi-message listing and swapping.
Jozsef Kadlecsik [Thu, 16 Dec 2010 11:19:00 +0000 (12:19 +0100)]
Add test to check multi-message listing and swapping.

14 years agoMistypeing in the hbucket() macro fixed.
Jozsef Kadlecsik [Thu, 16 Dec 2010 11:02:59 +0000 (12:02 +0100)]
Mistypeing in the hbucket() macro fixed.

14 years agoManpage cleanups, so it's more clear and straightforward.
Jozsef Kadlecsik [Wed, 15 Dec 2010 16:39:57 +0000 (17:39 +0100)]
Manpage cleanups, so it's more clear and straightforward.

14 years agoFix outdated messages in the tests
Jozsef Kadlecsik [Tue, 14 Dec 2010 20:23:41 +0000 (21:23 +0100)]
Fix outdated messages in the tests

14 years agoDocument which elements cannot be stored in the different hash types.
Jozsef Kadlecsik [Tue, 14 Dec 2010 16:45:49 +0000 (17:45 +0100)]
Document which elements cannot be stored in the different hash types.

And enforce from kernel side as well...

14 years agoSpeed up testing a little bit
Jozsef Kadlecsik [Mon, 13 Dec 2010 16:46:23 +0000 (17:46 +0100)]
Speed up testing a little bit

Lower timeout values to max 5s, so we can lower sleep values too.

14 years agoConvert last printks to pr_debug in ip_set_ahash.h
Jozsef Kadlecsik [Mon, 13 Dec 2010 12:41:21 +0000 (13:41 +0100)]
Convert last printks to pr_debug in ip_set_ahash.h

14 years agoRemove remnants of slist from ip_set_ahash.h
Jozsef Kadlecsik [Mon, 13 Dec 2010 11:40:06 +0000 (12:40 +0100)]
Remove remnants of slist from ip_set_ahash.h

14 years agoBuffered commands are just ... buffered.
Jozsef Kadlecsik [Mon, 13 Dec 2010 11:31:12 +0000 (12:31 +0100)]
Buffered commands are just ... buffered.

Calculate the free buffer size when adding the existing attributes at the buffered
commands. If the buffer is full, cancel the unfinished nested attribute and commit
the previously buffered commands. Then restart with the current buffered command.
Thus we can get rid of the ugly maxsize parameter of the set types.

14 years agoFixing dangling empty line produced backward-incompatible exit codes, fixed.
Jozsef Kadlecsik [Mon, 13 Dec 2010 11:25:21 +0000 (12:25 +0100)]
Fixing dangling empty line produced backward-incompatible exit codes, fixed.

14 years agoSupport case-insensitive ICMP and ICMPv6 type/code names.
Jozsef Kadlecsik [Fri, 10 Dec 2010 22:04:59 +0000 (23:04 +0100)]
Support case-insensitive ICMP and ICMPv6 type/code names.

14 years agoCompiler flag compatibility fix with libmnl
Jozsef Kadlecsik [Fri, 10 Dec 2010 22:02:30 +0000 (23:02 +0100)]
Compiler flag compatibility fix with libmnl

libmnl now uses void pointer arithmetic, remove -Wpointer-arith from
the compiler flags.

14 years agoFix dangling empty line at error/warning messages emitted by ipset.
Jozsef Kadlecsik [Fri, 10 Dec 2010 16:19:59 +0000 (17:19 +0100)]
Fix dangling empty line at error/warning messages emitted by ipset.

14 years agoAdd proper RCU protection to resizing
Jozsef Kadlecsik [Fri, 10 Dec 2010 16:04:38 +0000 (17:04 +0100)]
Add proper RCU protection to resizing

Resizing can be triggered by userspace command only, and those
are serialized by the nfnl mutex. During resizing the set is
read-locked, so the only possible concurrent operations are
the kernel side readers. Those must be protected by proper RCU locking.

14 years agoConvert hash types from chash to ahash.
Jozsef Kadlecsik [Fri, 10 Dec 2010 12:54:51 +0000 (13:54 +0100)]
Convert hash types from chash to ahash.

Instead of the cache friendly hashing, use the array based hashing.
According to my tests the latter uses less memory, faster at lookup and
deletion, and only slower at insertion.

14 years agoStrip off ip_set_ prefix from non-ipset specific header files.
Jozsef Kadlecsik [Wed, 8 Dec 2010 15:57:20 +0000 (16:57 +0100)]
Strip off ip_set_ prefix from non-ipset specific header files.

14 years agoUpdate ip_set_jhash.h
Jozsef Kadlecsik [Wed, 8 Dec 2010 15:52:43 +0000 (16:52 +0100)]
Update ip_set_jhash.h

Update ip_set_jhash.h with the version which was submitted for kernel
inclusion.

14 years agoCreate include/linux/netfilter/ipset/ directory
Jozsef Kadlecsik [Tue, 7 Dec 2010 16:46:40 +0000 (17:46 +0100)]
Create include/linux/netfilter/ipset/ directory

Separate the ipset header files from netfilter header files.

14 years agoComplete Kconfig.ipset with hash:net,port type.
Jozsef Kadlecsik [Tue, 7 Dec 2010 16:33:16 +0000 (17:33 +0100)]
Complete Kconfig.ipset with hash:net,port type.

14 years agoRemove include/net/pfxlen.h
Jozsef Kadlecsik [Tue, 7 Dec 2010 16:28:17 +0000 (17:28 +0100)]
Remove include/net/pfxlen.h

Spare some memory by moving the static prefixlen maps to the ipset core.
Thus we can get rid of include/net/pfxlen.h too.

14 years agoRemove command MODIFY
Jozsef Kadlecsik [Tue, 7 Dec 2010 16:08:12 +0000 (17:08 +0100)]
Remove command MODIFY

Modifying a set can be performed by save/modify/restore/swap, without
adding kernel part support.

14 years agoWhitespace, checkpatch.pl cleanups.
Jozsef Kadlecsik [Tue, 7 Dec 2010 16:01:55 +0000 (17:01 +0100)]
Whitespace, checkpatch.pl cleanups.

14 years agoThe protocol extended with the command MODIFY.
Jozsef Kadlecsik [Fri, 5 Nov 2010 16:02:21 +0000 (17:02 +0100)]
The protocol extended with the command MODIFY.

The command is not used yet, but better to reserve it already.

14 years agoUpdate README file
Jozsef Kadlecsik [Fri, 5 Nov 2010 16:00:42 +0000 (17:00 +0100)]
Update README file

Cleaned up the netlink.patch part: there's no more multiple patches.
The incompatibilities against 4.x are listed in details.

14 years agoManpage and help text fixes. v5.0-pre10
Jozsef Kadlecsik [Tue, 2 Nov 2010 13:51:17 +0000 (14:51 +0100)]
Manpage and help text fixes.

The manpage is updated to reflect the recent modifications and
the addition of the hash:net,port type. The help text of hash:ip
is updated: adding/deleting multiple entries are supported for
IPv4 only.