]> git.ipfire.org Git - thirdparty/iptables.git/log
thirdparty/iptables.git
17 years agoRemove compiler.h inclusions.
Patrick McHardy [Fri, 22 Feb 2008 15:00:57 +0000 (15:00 +0000)] 
Remove compiler.h inclusions.

17 years agoAdd netfilter.h
Patrick McHardy [Tue, 29 Jan 2008 14:34:27 +0000 (14:34 +0000)] 
Add netfilter.h

17 years agofix gcc warnings
Max Kellermann [Tue, 29 Jan 2008 13:48:05 +0000 (13:48 +0000)] 
fix gcc warnings

Max Kellermann <max@duempel.org>

17 years agoallow empty strings in argument parser
Max Kellermann [Tue, 29 Jan 2008 13:46:01 +0000 (13:46 +0000)] 
allow empty strings in argument parser

Max Kellermann <max@duempel.org>

17 years agounescape parameters
Max Kellermann [Tue, 29 Jan 2008 13:45:29 +0000 (13:45 +0000)] 
unescape parameters

Max Kellermann <max@duempel.org>

17 years agoescape strings
Max Kellermann [Tue, 29 Jan 2008 13:44:34 +0000 (13:44 +0000)] 
escape strings

Max Kellermann <max@duempel.org>

17 years agouse size_t
Max Kellermann [Tue, 29 Jan 2008 13:43:35 +0000 (13:43 +0000)] 
use size_t

Max Kellermann <max@duempel.org>

17 years agowhitespace cleanup
Max Kellermann [Tue, 29 Jan 2008 13:42:48 +0000 (13:42 +0000)] 
whitespace cleanup

Max Kellermann <max@duempel.org>

17 years agoFix REDIRECT manpage
Max Kellermann [Tue, 29 Jan 2008 13:40:11 +0000 (13:40 +0000)] 
Fix REDIRECT manpage

Max Kellermann <max@duempel.org>

17 years ago[IPTABLES]: libxt_owner: UID/GID range support
Jan Engelhardt [Tue, 29 Jan 2008 13:38:05 +0000 (13:38 +0000)] 
[IPTABLES]: libxt_owner: UID/GID range support

UID/GID range support for libxt_owner

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years ago[IPTABLES]: libxt_conntrack revision 1
Jan Engelhardt [Tue, 29 Jan 2008 13:37:21 +0000 (13:37 +0000)] 
[IPTABLES]: libxt_conntrack revision 1

Add support for xt_conntrack match revision 1.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agolibxt_CONNMARK revision 1
Jan Engelhardt [Tue, 29 Jan 2008 13:36:27 +0000 (13:36 +0000)] 
libxt_CONNMARK revision 1

Add support for xt_CONNMARK target revision 1.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agoBuild adjustments
Jan Engelhardt [Tue, 29 Jan 2008 13:33:23 +0000 (13:33 +0000)] 
Build adjustments

A few build system changes.
* ip6tables needs IP6T_LIB_DIR
* correctly trigger rebuild of master manpages when
  submanpages have been touched

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de.
17 years agoGive preference to iptables header files
Jan Engelhardt [Tue, 29 Jan 2008 13:32:07 +0000 (13:32 +0000)] 
Give preference to iptables header files

Have the header files in the iptables source tree take precedence
over those from the kernel source. Otherwise, building the current
iptables from subversion just fails with kernels < 2.6.25.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agoRemove obsolete file
Patrick McHardy [Sun, 20 Jan 2008 16:53:12 +0000 (16:53 +0000)] 
Remove obsolete file

17 years agolibxt_TCPOPTSTRIP
Sven Schnelle [Sun, 20 Jan 2008 13:45:16 +0000 (13:45 +0000)] 
libxt_TCPOPTSTRIP

Import libxt_TCPOPTSTRIP into iptables.

Signed-off-by: Sven Schnelle <svens@bitebene.org>
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agolibxt_iprange r1
Jan Engelhardt [Sun, 20 Jan 2008 13:43:49 +0000 (13:43 +0000)] 
libxt_iprange r1

Add support for xt_iprange revision 1

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agolibxt_iprange r0
Jan Engelhardt [Sun, 20 Jan 2008 13:42:43 +0000 (13:42 +0000)] 
libxt_iprange r0

Move libipt_iprange to libxt_iprange.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agolibxt_mark r1
Jan Engelhardt [Sun, 20 Jan 2008 13:41:22 +0000 (13:41 +0000)] 
libxt_mark r1

Introduce libxt_mark match revision 1 support.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agolibxt_hashlimit checks
Jan Engelhardt [Sun, 20 Jan 2008 13:39:11 +0000 (13:39 +0000)] 
libxt_hashlimit checks

Add checks for libxt_hashlimit so that options cannot be passed twice

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agorename overlapping function names
Jan Engelhardt [Sun, 20 Jan 2008 13:38:08 +0000 (13:38 +0000)] 
rename overlapping function names

Rename overlapping function names.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agobunch o' renames
Jan Engelhardt [Sun, 20 Jan 2008 13:36:08 +0000 (13:36 +0000)] 
bunch o' renames

Move a few functions from iptables.c/ip6tables.c to xtables.c
so they are available for combined (both AF_INET and AF_INET6)
libxt modules. Rename overlapping function names.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agolibxt_conntrack r0
Jan Engelhardt [Sun, 20 Jan 2008 13:34:07 +0000 (13:34 +0000)] 
libxt_conntrack r0

Move libipt_conntrack to libxt_conntrack.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agoprint warning when dlopen fails
Jan Engelhardt [Sun, 20 Jan 2008 13:32:50 +0000 (13:32 +0000)] 
print warning when dlopen fails

If the file exists but could not be loaded, print the dlerror().
Often it is a missing symbol.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agolibxt_connmark r1
Jan Engelhardt [Sun, 20 Jan 2008 13:32:01 +0000 (13:32 +0000)] 
libxt_connmark r1

Add support for xt_connmark match revision 1.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agolibxt_MARK r2
Jan Engelhardt [Sun, 20 Jan 2008 13:31:13 +0000 (13:31 +0000)] 
libxt_MARK r2

Add support for xt_MARK target revision 2.
Also consolidate libip6t_MARK.man and libipt_MARK.man.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agolibxt_TOS
Jan Engelhardt [Sun, 20 Jan 2008 13:25:08 +0000 (13:25 +0000)] 
libxt_TOS

Move libipt_TOS revision 0 to libxt_TOS revision 0 and add support
for xt_TOS target revision 1.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agolibxt_tos
Jan Engelhardt [Sun, 20 Jan 2008 13:22:42 +0000 (13:22 +0000)] 
libxt_tos

Move libipt_tos revision 0 to libxt_tos revision 0 and add support
for xt_tos match revision 1.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agolibxt_owner
Jan Engelhardt [Sun, 20 Jan 2008 13:21:38 +0000 (13:21 +0000)] 
libxt_owner

libxt_owner merges libipt_owner and libip6t_owner, and adds support
for the xt_owner match revision 1.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agocommon error messages
Jan Engelhardt [Sun, 20 Jan 2008 13:19:40 +0000 (13:19 +0000)] 
common error messages

Error messages vary wildly among modules, and there is a lot of
reundance in it too. Introduce a helper function that does all of
the parameter checking boilerplate and gives unique messages.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agoIntroduce strtonum(), which works like string_to_number(), but passes
Jan Engelhardt [Sun, 20 Jan 2008 13:18:54 +0000 (13:18 +0000)] 
Introduce strtonum(), which works like string_to_number(), but passes
back the 'end' pointer. It is useful where you want to do boundary
checking yet work with strings that are not entirely slurped by
strtoul(), e.g.:

s = "1/2"; /* one half */
if (!strtonum(s, &end, &value, 0, 5))
error("Zero-length string, or value out of bounds");
if (*end != '/')
error("Malformed string");
info->param1 = value;
if (!strtonum(end + 1, &end, &value, 2, 4))
error("..");
if (*end != '\0')
error("Malformed string");
info->param2 = value;

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agoConverts the iptables build infrastructure to autotools.
Jan Engelhardt [Sun, 20 Jan 2008 13:14:00 +0000 (13:14 +0000)] 
Converts the iptables build infrastructure to autotools.

- Can build both static and dynamic at the same time

- iptables-static will be a multi-binary, semi-static
(link against libc but w/o dynamic plugins)

- Always build IPv6 modules

- consider INSTALL

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years ago- cleanup several code wraparounds
Pablo Neira Ayuso [Thu, 17 Jan 2008 17:30:27 +0000 (17:30 +0000)] 
- cleanup several code wraparounds
- check for malloc() return value in merge_opts()
- check for merge_opts() return value

17 years agoAdd rateest match extension
Patrick McHardy [Tue, 15 Jan 2008 17:27:04 +0000 (17:27 +0000)] 
Add rateest match extension

Signed-off-by: Patrick McHardy <kaber@trash.net>
17 years agoAdd RATEEST target extension
Patrick McHardy [Tue, 15 Jan 2008 17:25:39 +0000 (17:25 +0000)] 
Add RATEEST target extension

Signed-off-by: Patrick McHardy <kaber@trash.net>
17 years agoSolving scalability issue: for chain list "name" searching.
Jesper Dangaard Brouer [Tue, 15 Jan 2008 17:18:15 +0000 (17:18 +0000)] 
Solving scalability issue: for chain list "name" searching.

Solving scalability issue: for chain list "name" searching.
Functions: iptcc_find_label(), iptc_is_chain().

Testing if a chain exist, requires a linearly walk of linked list with
chain-names (doing a strcmp(3) in each step). Giving a worst-case
runtime of O(n) where n is the number of chains.

Why is this important to fix?! If only called once, this should not be
a big concern, even-though the string compares are expensive.

The performance issue arise with many chains for example; when using
"iptables-restore", or when listing all "iptables -nL" rules, or when
using CPAN IPTables::libiptc.

Having 50k chains, the rule listing, with the command:
 "./iptables -nL > /dev/null",
Without patch it takes approximately 5 minutes,
With the patch it takes 0.5 seconds.

Listing without patch:
 real    4m49.426s
 user    4m37.993s
 sys     0m0.280s

Listing with patch:
 real    0m0.558s
 user    0m0.484s
 sys     0m0.064s

How is it solved?!

The issue is solved introducing a new data structure, that allow us to
do binary search of chain names. Thus, reducing the worst-case runtime
to O(log n).

Being more specific:

 The new data structure is called "chain index", which is an array with
 pointers into the chain list, with CHAIN_INDEX_BUCKET_LEN spacing.
 This facilitates the ability to speedup chain list searching, by find
 a more optimal starting points when searching the linked list.

 The runtime complexity is actually also affected by this "bucket" size
 concept. Thus, O(log(n/k) + k) where k is CHAIN_INDEX_BUCKET_LEN.

 A nice property of the chain index, is that the "bucket" list
 length is max CHAIN_INDEX_BUCKET_LEN (when just build, inserts will
 change this). Oppose to hashing, where the "bucket" list length can
 vary a lot.

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
17 years agoIntroduce a counter for number of user defined chains.
Jesper Dangaard Brouer [Tue, 15 Jan 2008 17:06:48 +0000 (17:06 +0000)] 
Introduce a counter for number of user defined chains.

Introduce a counter for number of user defined chains.

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
17 years agoInline functions iptcc_is_builtin() and set_changed().
Jesper Dangaard Brouer [Tue, 15 Jan 2008 17:01:58 +0000 (17:01 +0000)] 
Inline functions iptcc_is_builtin() and set_changed().

The two functions are obvious candidates for inlining.
Using gprof(1) shows that they actually affects performance.

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
17 years agoFix CONNMARK mask initialisation
Peter Warasin [Tue, 15 Jan 2008 15:46:35 +0000 (15:46 +0000)] 
Fix CONNMARK mask initialisation

This patch fixes the problem that the CONNMARK mask value
has been set to 0 whenever the CONNMARK target options were
not the last options to be processed.
It initalizes the mask value rather than setting it for
each parse.

Signed-off-by: Peter Warasin <peter@endian.com>
17 years agobump version from 1.4.0rc1 to 1.4.0 final v1.4.0
Pablo Neira Ayuso [Sat, 22 Dec 2007 12:56:28 +0000 (12:56 +0000)] 
bump version from 1.4.0rc1 to 1.4.0 final

17 years agoiptables and NO_SHARED_LIBS/dlfcn.h
Mike Frysinger [Wed, 19 Dec 2007 14:51:17 +0000 (14:51 +0000)] 
iptables and NO_SHARED_LIBS/dlfcn.h

if NO_SHARED_LIBS is defined, then iptables shouldnt even include dlfcn.h.
otherwise you hit a build failure when using toolchains that do not provide
dlfcn.h because they do not support shared objects.

Signed-Off-By: Mike Frysinger <vapier@gentoo.org>
17 years agouse <linux/types.h>
Jan Engelhardt [Mon, 17 Dec 2007 13:12:01 +0000 (13:12 +0000)] 
use <linux/types.h>

Remove our own definitions of the Linux types and use <linux/types.h>
instead. libiptc needs it too, or otherwise will choke on union
nf_inet_addr.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agoMore safe chain sorting, improving r7098
Jesper Dangaard Brouer [Wed, 12 Dec 2007 15:20:42 +0000 (15:20 +0000)] 
More safe chain sorting, improving r7098

This patch is an improvment of r7098 (made by me).

Assuring compatibility between 1.4.0 and older versions,
regarding chain sorting.

Chains from kernel are already sorted, as they are inserted
sorted. But there exists an issue when shifting to 1.4.0
from an older version, as old versions allow last created
chain to be unsorted.  This unsorted chain would survive in
1.4.0, as chains are now only sorted on creation.

This patch verifies that chains are sorted, if not it fixes the sorting.

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
17 years agoFix sockfd use accounting for kernels without autoloading
Patrick McHardy [Tue, 4 Dec 2007 15:27:53 +0000 (15:27 +0000)] 
Fix sockfd use accounting for kernels without autoloading

17 years agoFix showing help text for matches/targets with revision as user
Patrick McHardy [Mon, 3 Dec 2007 15:32:28 +0000 (15:32 +0000)] 
Fix showing help text for matches/targets with revision as user

When running as a user iptables can't determine the highest supported
revision and exits. Assume all revision are supported in case we get
a EPERM. If the user is not showing the help text but trying to add
new rules he'll get EPERM later anyway.

17 years agoUnifies libip[6]t_SECMARK.man to libxt_SECMARK.man
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 05:57:54 +0000 (05:57 +0000)] 
Unifies libip[6]t_SECMARK.man to libxt_SECMARK.man

17 years agoUnifies libip[6]t_CONNSECMARK.man to libxt_CONNSECMARK.man
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 05:56:57 +0000 (05:56 +0000)] 
Unifies libip[6]t_CONNSECMARK.man to libxt_CONNSECMARK.man

17 years agoFixes missing '6' and 'X' in definitions of selinux related extension lists.
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 05:52:31 +0000 (05:52 +0000)] 
Fixes missing '6' and 'X' in definitions of selinux related extension lists.

17 years agoRemove libip6t_state.c. libxt_state.c supports IPv6.
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 05:41:27 +0000 (05:41 +0000)] 
Remove libip6t_state.c. libxt_state.c supports IPv6.

17 years agoUnifies libip[6]t_udp.man to libxt_udp.man
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 05:01:37 +0000 (05:01 +0000)] 
Unifies libip[6]t_udp.man to libxt_udp.man

17 years agoRemoves libip6t_u32.man
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 04:59:51 +0000 (04:59 +0000)] 
Removes libip6t_u32.man

libxt_u32.man already exists.

17 years agoUnifies libip[6]t_physdev.man to libxt_physdev.man
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 04:56:49 +0000 (04:56 +0000)] 
Unifies libip[6]t_physdev.man to libxt_physdev.man

17 years agoUnifies libip[6]t_mark.man to libxt_mark.man
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 04:55:35 +0000 (04:55 +0000)] 
Unifies libip[6]t_mark.man to libxt_mark.man

17 years agoUnifies libip[6]t_mac.man to libxt_mac.man
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 04:50:19 +0000 (04:50 +0000)] 
Unifies libip[6]t_mac.man to libxt_mac.man

17 years agoUnifies libip[6]t_limit.man to libxt_limit.man
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 04:49:14 +0000 (04:49 +0000)] 
Unifies libip[6]t_limit.man to libxt_limit.man

17 years agoUnifies libip[6]t_esp.man to libxt_esp.man
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 04:47:55 +0000 (04:47 +0000)] 
Unifies libip[6]t_esp.man to libxt_esp.man

17 years agoUnifies libip[6]t_NFQUEUE.man to libxt_NFQUEUE.man
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 04:46:25 +0000 (04:46 +0000)] 
Unifies libip[6]t_NFQUEUE.man to libxt_NFQUEUE.man

17 years agoMove libipt_tcpmss.man to libxt_tcpmss.man for ip6tables.8
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 04:43:47 +0000 (04:43 +0000)] 
Move libipt_tcpmss.man to libxt_tcpmss.man for ip6tables.8

17 years agoMove libipt_string.man to libxt_string.man for ip6tables.8
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 04:42:05 +0000 (04:42 +0000)] 
Move libipt_string.man to libxt_string.man for ip6tables.8

17 years agoMove libipt_state.man to libxt_state.man for ip6tables.8
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 04:40:59 +0000 (04:40 +0000)] 
Move libipt_state.man to libxt_state.man for ip6tables.8

17 years agoMove libipt_sctp.man to libxt_sctp.man for ip6tables.8
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 04:39:51 +0000 (04:39 +0000)] 
Move libipt_sctp.man to libxt_sctp.man for ip6tables.8

17 years agoMove libipt_quota.man to libxt_quota.man for ip6tables.8
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 04:38:38 +0000 (04:38 +0000)] 
Move libipt_quota.man to libxt_quota.man for ip6tables.8

17 years agoMove libipt_pkttype.man to libxt_pkttype.man for ip6tables.8
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 04:37:30 +0000 (04:37 +0000)] 
Move libipt_pkttype.man to libxt_pkttype.man for ip6tables.8

17 years agoMove libipt_helper.man to libxt_helper.man for ip6tables.8
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 04:36:12 +0000 (04:36 +0000)] 
Move libipt_helper.man to libxt_helper.man for ip6tables.8

17 years agoMove libipt_hashlimit.man to libxt_hashlimit.man for ip6tables.8
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 04:35:06 +0000 (04:35 +0000)] 
Move libipt_hashlimit.man to libxt_hashlimit.man for ip6tables.8

17 years agoMove libipt_dscp.man to libxt_dscp.man for ip6tables.8
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 04:33:43 +0000 (04:33 +0000)] 
Move libipt_dscp.man to libxt_dscp.man for ip6tables.8

17 years agoMove libipt_dccp.man to libxt_dccp.man for ip6tables.8
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 04:32:12 +0000 (04:32 +0000)] 
Move libipt_dccp.man to libxt_dccp.man for ip6tables.8

17 years agoMove libipt_connmark.man to libxt_connmark.man for ip6tables.8
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 04:30:51 +0000 (04:30 +0000)] 
Move libipt_connmark.man to libxt_connmark.man for ip6tables.8

17 years agoMove libipt_connbytes.man to libxt_connbytes.man for ip6tables.8
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 03:44:35 +0000 (03:44 +0000)] 
Move libipt_connbytes.man to libxt_connbytes.man for ip6tables.8

17 years agoMove libipt_comment.man to libxt_comment.man for ip6tables.8
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 03:43:06 +0000 (03:43 +0000)] 
Move libipt_comment.man to libxt_comment.man for ip6tables.8

17 years agoMove libipt_NOTRACK.man to libxt_NOTRACK.man for ip6tables.8
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 03:41:49 +0000 (03:41 +0000)] 
Move libipt_NOTRACK.man to libxt_NOTRACK.man for ip6tables.8

17 years agoMove libipt_DSCP.man to libxt_DSCP.man for ip6tables.8
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 03:40:30 +0000 (03:40 +0000)] 
Move libipt_DSCP.man to libxt_DSCP.man for ip6tables.8

17 years agoMoves libipt_CONNMARK.man to libxt_CONNMARK.man for ip6tables.8
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 03:39:04 +0000 (03:39 +0000)] 
Moves libipt_CONNMARK.man to libxt_CONNMARK.man for ip6tables.8

17 years agoMoves libipt_CLASSYFY.man to libxt_CLASSYFY.man for ip6tables.8
Yasuyuki KOZAKAI [Thu, 29 Nov 2007 03:37:36 +0000 (03:37 +0000)] 
Moves libipt_CLASSYFY.man to libxt_CLASSYFY.man for ip6tables.8

17 years agoFix connlimit output for inverted --connlimit-above: ! > is <=, not <
Patrick McHardy [Wed, 28 Nov 2007 09:50:22 +0000 (09:50 +0000)] 
Fix connlimit output for inverted --connlimit-above: ! > is <=, not <

17 years agoiptables/libiptc perf issue: Sorting chain during pull-out
Jesper Dangaard Brouer [Wed, 28 Nov 2007 08:40:26 +0000 (08:40 +0000)] 
iptables/libiptc perf issue: Sorting chain during pull-out

Performance optimize scalability issue:
  Sorting chain during pull-out give worst-case runtime O(Chains2).

When pulling out the blob, every chain name is inserted alphabetically
into a linked list (by function iptc_insert_chain()).  The problem
with this approach is that the chain names delivered in the blob is
already sorted (as we push it back to the kernel sorted).

This cause chain parsing to always process every element in the chain
list and finish with a tail add.  Causing worst-case runtime O(C2/2)
for alphabetically sorting of chains.

The patch solves this by only calling iptc_insert_chain() when
creating new chains.

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
17 years agoAdd NFLOG manpage
Patrick McHardy [Mon, 26 Nov 2007 06:49:08 +0000 (06:49 +0000)] 
Add NFLOG manpage

17 years agoiptables: always print mask in iptables-save
Jan Engelhardt [Sun, 25 Nov 2007 15:27:56 +0000 (15:27 +0000)] 
iptables: always print mask in iptables-save

iptables prints the mask as a prefix length if it is valid;
This patch makes iptables-save do the same.

Also, iptables-save will always print "/32" in the "-s addr/32"
case now. This reduces the amount of code external parsing scripts
need to provide to properly parse iptables-save output.

ip6tables-save already does the right thing, so no change there.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agoiptables: move manpage
Jan Engelhardt [Sun, 25 Nov 2007 15:26:54 +0000 (15:26 +0000)] 
iptables: move manpage

Rename libipt_{time,u32}.man to libxt_{time,u32}.man to go
in line with the C files.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agoiptables: fix check_inverse() call
Jan Engelhardt [Sun, 25 Nov 2007 15:25:23 +0000 (15:25 +0000)] 
iptables: fix check_inverse() call

Fix a typo in call to check_inverse().

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agoFix make/compile error for iptables-1.4.0rc1
Jesper Brouer [Sun, 25 Nov 2007 15:22:18 +0000 (15:22 +0000)] 
Fix make/compile error for iptables-1.4.0rc1

Fixing a make/compile issue with iptables, release candidate 1.4.0rc1,
which has existed since SVN changeset 6920.  This patch adds ip_tables.h
and ip6_tables.h, and updates x_tables.h, taken from Linus'es git tree.

Changeset 6920 added the include file x_tables.h from kernel source, but
didn't add ip_tables.h and ip6_tables.h.

At some point (Tue Nov 14 19:48:48 2006, by Yasuyuki Kozakai) these
kernel headers where changed, which actually removes certain
depencencies from ip_tables.h and ip6_tables.h to x_tables.h.

If compiling will fail, with old kernel headers (ip_tables.h and
ip6_tables.h) available in systems include path, because they depend on
certaine defines in x_tables.h with is missing in the version in SVN.

Jesper Brouer <jdb@comx.dk>

17 years agoPATCH - Fix for --random option in DNAT and REDIRECT
Tom Eastep [Thu, 15 Nov 2007 13:06:58 +0000 (13:06 +0000)] 
PATCH - Fix for --random option in DNAT and REDIRECT

The --random option produces "Unknown arg `--random'" errors with both the
DNAT and REDIRECT targets. Corrected by the attached patch.

Tom Eastep <teastep@shorewall.net>

17 years agoDocument xt_statistic (Stefano Sabatini <stefano.sabatini-lala@poste.it>)
Stefano Sabatini [Mon, 12 Nov 2007 06:02:13 +0000 (06:02 +0000)] 
Document xt_statistic (Stefano Sabatini <stefano.sabatini-lala@poste.it>)

17 years agoiptables-edit: iptables-edit: adds --table to iptables-restore
Peter Warasin [Mon, 5 Nov 2007 19:35:31 +0000 (19:35 +0000)] 
iptables-edit: iptables-edit: adds --table to iptables-restore

adds --table to iptables-restore which allows to restore only the supplied table

Signed-off-by: Peter Warasin <peter@endian.com>
17 years agolet DO_MULTI=1 work for ip6tables* binaries part 2
Hann-Huei Chiou [Wed, 31 Oct 2007 11:48:04 +0000 (11:48 +0000)] 
let DO_MULTI=1 work for ip6tables* binaries part 2

Sorry forgot to mention that the "ip6tables-multi.c" (in the patch) which is
not in the repository has to be manually added.

Hann-huei Chiou <koala@ascenvision.com>

17 years agoIntroducing libxt_*.man files. Sorted matches and modules
László Attila Tóth [Wed, 31 Oct 2007 11:46:40 +0000 (11:46 +0000)] 
Introducing libxt_*.man files. Sorted matches and modules

The iptables.8 and ip6tables.8 man pages are now generated from libxt_*.man
files too. For xtables modules one man page is enough with libxt_ prefix.

The match and target lists are sorted alphabetically.

The make command doesn't print anything when creates man pages.

Signed-off-by: Laszlo Attila Toth <panther@balabit.hu>
17 years agolet DO_MULTI=1 work for ip6tables* binaries
Hann-Huei Chiou [Tue, 23 Oct 2007 14:22:34 +0000 (14:22 +0000)] 
let DO_MULTI=1 work for ip6tables* binaries

When defining DO_MULTI=1 in Makefile, only iptables is built as
a single multipurpose binary. This patch makes ip6tables also be
built in the same manner.

Hann-huei Chiou <koala@ascenvision.com>

17 years agoTransfer all my copyright over to our company.
Jan Engelhardt [Sat, 20 Oct 2007 15:17:30 +0000 (15:17 +0000)] 
Transfer all my copyright over to our company.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agoDon't silenty exit on failure to open /proc/net/{ip,ip6}_tables_names
Victor Stinner [Thu, 18 Oct 2007 14:27:03 +0000 (14:27 +0000)] 
Don't silenty exit on failure to open /proc/net/{ip,ip6}_tables_names

Victor Stinner <victor.stinner@inl.fr>

17 years agoFix the compile warning fix
Patrick McHardy [Thu, 18 Oct 2007 12:34:20 +0000 (12:34 +0000)] 
Fix the compile warning fix

According to Jan:

While the fields of struct xt_time are uints, the defined
time_t span is by definition 0..231-1, i.e. it should be
INT_MAX, not UINT_MAX.

17 years agoFix compiler warning on 64 bit: date_stop is an u_int32_t, so use UINT_MAX instead...
Patrick McHardy [Thu, 18 Oct 2007 09:36:39 +0000 (09:36 +0000)] 
Fix compiler warning on 64 bit: date_stop is an u_int32_t, so use UINT_MAX instead of LONG_MAX

17 years agoextension/sctp: fix - mistake to pass a pointer where array is required
Li Zefan [Thu, 18 Oct 2007 09:12:49 +0000 (09:12 +0000)] 
extension/sctp: fix - mistake to pass a pointer where array is required

Macros like SCTP_CHUNKMAP_XXX(chukmap) require chukmap to be an array,
but print_chunks() passes a pointer to these macros.

Li Zefan <lizf@cn.fujitsu.com>

17 years ago[PATCH iptables] print warnings to stderr
Max Kellermann [Wed, 17 Oct 2007 16:36:49 +0000 (16:36 +0000)] 
[PATCH iptables] print warnings to stderr

iptables prints some of its error messages and warnings to stdout.
This patch applies to svn r7075 and will make iptables print
diagnostic messages to stderr instead.

Signed-off-by: Max Kellermann <max@duempel.org>
17 years agoInstall ip6tables-{save,restore} manpages
Patrick McHardy [Wed, 17 Oct 2007 08:52:19 +0000 (08:52 +0000)] 
Install ip6tables-{save,restore} manpages

17 years agoFix sscanf type errors
Patrick McHardy [Wed, 17 Oct 2007 08:48:58 +0000 (08:48 +0000)] 
Fix sscanf type errors

17 years agoAdd ip6tables-{save,restore} to non-experimental target, fix strict aliasing warnings
Patrick McHardy [Tue, 16 Oct 2007 08:49:31 +0000 (08:49 +0000)] 
Add ip6tables-{save,restore} to non-experimental target, fix strict aliasing warnings

17 years agobump version to 1.4.0rc1 v1.4.0-rc1
Pablo Neira Ayuso [Mon, 15 Oct 2007 12:49:23 +0000 (12:49 +0000)] 
bump version to 1.4.0rc1

17 years agomake print-extensions doesn't show libxt_* extensions
Sebastian Claßen [Mon, 8 Oct 2007 05:13:51 +0000 (05:13 +0000)] 
make print-extensions doesn't show libxt_* extensions

In extensions/Makefile the variable PFX_EXT_SLIB_OPTS is not appended to
OPTIONALS, therefor 'make print-extensions' doesn't show any optional
libxt_* extension.

Sebastian Claßen <sebastian.classen@freenet.ag>

17 years agoUnique symbols and no '&' characters
László Attila Tóth [Mon, 8 Oct 2007 05:12:42 +0000 (05:12 +0000)] 
Unique symbols and no '&' characters

Removing '&' from .._match and ..._target variables.
Give all symbols unique names.

Signed-off-by: Laszlo Attila Toth
17 years agoRemove redundant dst/hbh lines
Jan Engelhardt [Thu, 4 Oct 2007 16:30:40 +0000 (16:30 +0000)] 
Remove redundant dst/hbh lines

Remove hbh stuff from libip6t_dst,
remove dst stuff from libip6t_hbh.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>