]> git.ipfire.org Git - thirdparty/iptables.git/log
thirdparty/iptables.git
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>
17 years agoUnique symbols 6/6
Jan Engelhardt [Thu, 4 Oct 2007 16:29:39 +0000 (16:29 +0000)] 
Unique symbols 6/6

Give symbols of libxt targets unique names (3/3).

Adds unique prefixes to all functions (most of them - especially the hook
functions) so that debugging programs can unambiguously map a symbol to an
address. Also unifies the names of the xtables_match/xtables_target structs,
(based upon libxt_connmark.c/libip6t_*.c).

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
17 years agoUnique names 5/6
Jan Engelhardt [Thu, 4 Oct 2007 16:29:21 +0000 (16:29 +0000)] 
Unique names 5/6

Give symbols of libxt matches unique names (3/3).

Adds unique prefixes to all functions (most of them - especially the hook
functions) so that debugging programs can unambiguously map a symbol to an
address. Also unifies the names of the xtables_match/xtables_target structs,
(based upon libxt_connmark.c/libip6t_*.c).

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
17 years agoUnique names 4/6
Jan Engelhardt [Thu, 4 Oct 2007 16:29:00 +0000 (16:29 +0000)] 
Unique names 4/6

Give symbols of libxt targets unique names (2/3).

Adds unique prefixes to all functions (most of them - especially the hook
functions) so that debugging programs can unambiguously map a symbol to an
address. Also unifies the names of the xtables_match/xtables_target structs,
(based upon libxt_connmark.c/libip6t_*.c).

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
17 years agoUnique names 3/6
Jan Engelhardt [Thu, 4 Oct 2007 16:28:39 +0000 (16:28 +0000)] 
Unique names 3/6

Give symbols of libxt matches unique names (2/3).

Adds unique prefixes to all functions (most of them - especially the hook
functions) so that debugging programs can unambiguously map a symbol to an
address. Also unifies the names of the xtables_match/xtables_target structs,
(based upon libxt_connmark.c/libip6t_*.c).

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
17 years agoUnique names 2/6
Jan Engelhardt [Thu, 4 Oct 2007 16:27:30 +0000 (16:27 +0000)] 
Unique names 2/6

Give symbols of libxt targets unique names (1/3).

Adds unique prefixes to all functions (most of them - especially the hook
functions) so that debugging programs can unambiguously map a symbol to an
address. Also unifies the names of the xtables_match/xtables_target structs,
(based upon libxt_connmark.c/libip6t_*.c).

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
17 years agoUnique symbols 1/6
Jan Engelhardt [Thu, 4 Oct 2007 16:27:07 +0000 (16:27 +0000)] 
Unique symbols 1/6

Give symbols of libxt matches unique names (1/3).

Adds unique prefixes to all functions (most of them - especially the hook
functions) so that debugging programs can unambiguously map a symbol to an
address. Also unifies the names of the xtables_match/xtables_target structs,
(based upon libxt_connmark.c/libip6t_*.c).

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
17 years agoNo ipt in xt
Jan Engelhardt [Thu, 4 Oct 2007 16:26:33 +0000 (16:26 +0000)] 
No ipt in xt

Cease using ipt_entry_match (replaced by xt_entry_match).

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
17 years agoConstify data structures
Jan Engelhardt [Thu, 4 Oct 2007 16:25:58 +0000 (16:25 +0000)] 
Constify data structures

Constify more data structures. Make functions static.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
17 years agoDelete empty ->print() and ->save() functions
Jan Engelhardt [Thu, 4 Oct 2007 16:25:23 +0000 (16:25 +0000)] 
Delete empty ->print() and ->save() functions

Deletes empty ->print() and ->save() functions.
ip[6]tables prints the trivial thing automatically.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
17 years agoDelete empty ->final_check() functions
Jan Engelhardt [Thu, 4 Oct 2007 16:24:50 +0000 (16:24 +0000)] 
Delete empty ->final_check() functions

Deletes empty ->final_check() functions, and makes ip[6]tables
checks for NULL on these.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
17 years agoDelete empty ->init() functions
Jan Engelhardt [Thu, 4 Oct 2007 16:24:00 +0000 (16:24 +0000)] 
Delete empty ->init() functions

Deletes empty ->init() functions. ip[6]tables already
checks for .init being NULL or not.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
17 years agoRemove stray NULLs
Jan Engelhardt [Thu, 4 Oct 2007 16:23:20 +0000 (16:23 +0000)] 
Remove stray NULLs

Mixing member accessors (non-named vs named) is not good.
Remove stray NULL.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
17 years agoAddrtype match: renaming functions
László Attila Tóth [Thu, 4 Oct 2007 05:01:35 +0000 (05:01 +0000)] 
Addrtype match: renaming functions

The function names in libipt_addrtype.c makes debugging hard, also I renamed them
prefixed by 'addrtype_'.

Laszlo attila toth <panther@balabit.hu>

17 years agoCouldn't load/find match `u32'
Hann-Huei Chiou [Fri, 28 Sep 2007 15:27:43 +0000 (15:27 +0000)] 
Couldn't load/find match `u32'

iptables (up to 0927 snapshot) keeps complaining of "Couldn't
load (or find, if NO_SHARED_LIBS=1) match `u32'. After comparing
with other libxt_*.c, I found that there's no member ".family"
in the "u32_reg" structure, while ".family = AF_INET6" exists
in "u32_reg6"

Hann-Huei Chiou <koala@ascenvision.com>

17 years agoAdd the libxt_time iptables match
Jan Engelhardt [Sun, 23 Sep 2007 15:17:42 +0000 (15:17 +0000)] 
Add the libxt_time iptables match

This is libipt_time from POM-ng enhanced by the following:

 * day-of-month support (for example "match on the 15th of each month")
 * inversion support for --weekdays and --monthdays
 * match against UTC or local timezone
 * a manpage

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
17 years agoFix u32 warnings
Jan Engelhardt [Wed, 19 Sep 2007 12:59:33 +0000 (12:59 +0000)] 
Fix u32 warnings

warning: format '%ld' expects type 'long int', but argument 3 has type 'int'.

With %u alone, you would get "but arg-start is long" warnings on x64.
With %lu, you would get "but arg-start is int" on x86.
Fix it up by explicitly deciding for one (%u and cast to unsigned int)
and using that.

Jan Engelhardt <jengelh@computergmbh.de>

17 years agoAdds u32 to iptables.
Jan Engelhardt [Mon, 10 Sep 2007 11:50:46 +0000 (11:50 +0000)] 
Adds u32 to iptables.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
17 years agoFix unused function warning
Patrick McHardy [Sat, 8 Sep 2007 16:52:25 +0000 (16:52 +0000)] 
Fix unused function warning

17 years agoFix more sparse warnings: non-C99 array declaration, incorrect function prototypes
Patrick McHardy [Sat, 8 Sep 2007 16:00:01 +0000 (16:00 +0000)] 
Fix more sparse warnings: non-C99 array declaration, incorrect function prototypes

17 years agoFix sparse warnings: non-ANSI function declarations, 0 used as pointer
Patrick McHardy [Sat, 8 Sep 2007 15:59:04 +0000 (15:59 +0000)] 
Fix sparse warnings: non-ANSI function declarations, 0 used as pointer

17 years agoMakefile for man pages of xtables extensions (Laszlo Attila Toth <panther@balabit...
László Attila Tóth [Thu, 6 Sep 2007 11:11:36 +0000 (11:11 +0000)] 
Makefile for man pages of xtables extensions (Laszlo Attila Toth <panther@balabit.hu>)

 * no extra target/match by default  :)
 * man page of fix modules (PF_EXT_SLIB etc.) plus optional
  (...SLIB_OPTS)  modules generated, but not all.
 * because of the previous one I had to rename PF_EXT_SE_SLIB to
   PF_EXT_SELINUX_SLIB etc. as a non-optional variable, original
   PF_EXT_SE_SLIB gets the value of PF_EXT_SELINUX_SLIB if DO_SELINUX is
   set to 1.

17 years agoRemove unsupported connrate extension
Patrick McHardy [Thu, 6 Sep 2007 11:06:11 +0000 (11:06 +0000)] 
Remove unsupported connrate extension

17 years agoBuild manpages for xtables extensions (Laszlo Attila Toth <panther@balabit.hu>)
László Attila Tóth [Wed, 5 Sep 2007 15:00:11 +0000 (15:00 +0000)] 
Build manpages for xtables extensions (Laszlo Attila Toth <panther@balabit.hu>)

17 years agoFix aligned_u64 type on 64 bit: its an unsigned long, not an unsigned long long.
Patrick McHardy [Wed, 5 Sep 2007 14:19:23 +0000 (14:19 +0000)] 
Fix aligned_u64 type on 64 bit: its an unsigned long, not an unsigned long long.
Fixes compiler warning in quota match.

17 years agoFix strict aliasing warnings
Patrick McHardy [Wed, 5 Sep 2007 14:10:53 +0000 (14:10 +0000)] 
Fix strict aliasing warnings

17 years agoBuild IPv6 hbh/dst matches unconditionally
Patrick McHardy [Wed, 5 Sep 2007 14:02:28 +0000 (14:02 +0000)] 
Build IPv6 hbh/dst matches unconditionally

17 years agoBuild IPv6 rt match unconditionally
Patrick McHardy [Wed, 5 Sep 2007 14:00:15 +0000 (14:00 +0000)] 
Build IPv6 rt match unconditionally

17 years agoBuild ipv6header match unconditionally
Patrick McHardy [Wed, 5 Sep 2007 13:58:58 +0000 (13:58 +0000)] 
Build ipv6header match unconditionally

17 years agoBuild IPv6 mh match unconditionally
Patrick McHardy [Wed, 5 Sep 2007 13:57:28 +0000 (13:57 +0000)] 
Build IPv6 mh match unconditionally

17 years agoResync header files and build IPv6 frag match unconditionally
Patrick McHardy [Wed, 5 Sep 2007 13:56:30 +0000 (13:56 +0000)] 
Resync header files and build IPv6 frag match unconditionally

17 years agoResync header file and build IPv6 ah match unconditionally
Patrick McHardy [Wed, 5 Sep 2007 13:55:27 +0000 (13:55 +0000)] 
Resync header file and build IPv6 ah match unconditionally