]>
git.ipfire.org Git - thirdparty/iptables.git/log
Jamal Hadi Salim [Wed, 11 Feb 2009 11:58:54 +0000 (12:58 +0100)]
libxtables: Introduce global params structuring
introduce a new struct,xtables_globals, so as to
localize the globals used and help in symbol renames.
The applications must invoke xtables_set_params() before starting
to use any iptables APIs.
xtables_set_params() is intended to free xtables from depending
(as it does right now) on existence of such externally definitions
(from iptables/iptables6 etc). At the moment, xtables wont even
compile without presence of at least one of {iptables/iptables6 etc}
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Patrick McHardy [Mon, 9 Feb 2009 17:58:45 +0000 (18:58 +0100)]
Merge branch 'master' of git://dev.medozas.de/iptables
Eric Leblond [Mon, 9 Feb 2009 17:34:01 +0000 (18:34 +0100)]
xt_NFLOG: Set default NFLOG qthreshold to 0
By setting default NFLOG qthreshold to 0, userspace does not overwrite
the per-instance value.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Sun, 8 Feb 2009 17:19:43 +0000 (18:19 +0100)]
Merge branch 'origin/master'
(throw away remote three commits as they had been redone
in this local branch)
Jan Engelhardt [Sat, 7 Feb 2009 18:59:53 +0000 (19:59 +0100)]
libxtables: move afinfo around
libxtables should not rely on the program executable providing the
magic constants for using [gs]etsockopt.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Jan Engelhardt [Sun, 1 Feb 2009 21:33:37 +0000 (22:33 +0100)]
libxtables: prefix names and order #3
This change affects:
find_{match,target} -> xtables_find_{match,target}
enum xt_tryload -> enum xtables_tryload
loose flags like DONT_LOAD -> XTF_DONT_LOAD
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Jan Engelhardt [Sun, 1 Feb 2009 21:32:56 +0000 (22:32 +0100)]
libxtables: prefix names and order it #2
This change affects:
load_xtables_ko -> xtables_load_ko
modprobe_program -> xtables_modprobe_program
Now uses bool for the "quiet" flag.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Jan Engelhardt [Sun, 1 Feb 2009 20:38:14 +0000 (21:38 +0100)]
libbxtables: prefix names and order it #1
It is good practice to prefix names in a library some way so that
it does not clash with external programs' variable names right
on the first try.
This change: rename fw_[cm]alloc to xtables_[cm]alloc and
move the definition from internal.h to xtables.h to avoid
potential compiler warnings.
These functions are intended to fix Jamal's dependency problem in
his tc's ipt action.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Jan Engelhardt [Fri, 30 Jan 2009 04:38:11 +0000 (05:38 +0100)]
libxtables: prefix/order - move parse_protocol to xtables.c
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Jan Engelhardt [Fri, 30 Jan 2009 03:55:38 +0000 (04:55 +0100)]
libxtables: prefix/order - move check_inverse to xtables.c
This also adds a warning that intrapositional negation support
is deprecated.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Jan Engelhardt [Fri, 30 Jan 2009 03:32:50 +0000 (04:32 +0100)]
libxtables: prefix - parse and escaped output func
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Jan Engelhardt [Fri, 30 Jan 2009 03:24:47 +0000 (04:24 +0100)]
libxtables: prefix - misc functions
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Jan Engelhardt [Fri, 30 Jan 2009 03:20:32 +0000 (04:20 +0100)]
libxtables: prefix/order - ascii to ipaddr/ipmask input
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Jan Engelhardt [Fri, 30 Jan 2009 02:55:09 +0000 (03:55 +0100)]
libxtables: prefix/order - ipaddr/ipmask to ascii output
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Jan Engelhardt [Tue, 27 Jan 2009 20:27:19 +0000 (21:27 +0100)]
libxtables: prefix/order - param_act
Changes:
exittype -> xtables_exittype
P_* -> XTF_* flags
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Jan Engelhardt [Tue, 27 Jan 2009 19:56:23 +0000 (20:56 +0100)]
libxtables: prefix/order - program_name
Split XTABLES_VERSION into xtables and iptables, and encode the
xtables soversion into the extensions instead. This makes it possible
to upgrade iptables without having to recompile 3rd-party extensions
(if the libxtables version matches, of course).
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Jan Engelhardt [Tue, 27 Jan 2009 17:43:01 +0000 (18:43 +0100)]
libxtables: prefix/order - strtoui
This commit also throws out the redundant string_to_number_*.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Jan Engelhardt [Tue, 27 Jan 2009 14:59:06 +0000 (15:59 +0100)]
libxtables: prefix/order - libdir
Consolidate the libdir variable initialization code into xtables.c.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Jan Engelhardt [Tue, 27 Jan 2009 14:23:01 +0000 (15:23 +0100)]
libxtables: prefix/order - match/target loading
This change affects:
find_{match,target} -> xtables_find_{match,target}
enum xt_tryload -> enum xtables_tryload
loose flags like DONT_LOAD -> XTF_DONT_LOAD
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Jan Engelhardt [Tue, 27 Jan 2009 14:10:05 +0000 (15:10 +0100)]
libxtables: prefix/order - modprobe and xtables.ko loading
This change affects:
load_xtables_ko -> xtables_load_ko
modprobe_program -> xtables_modprobe_program
Now uses bool for the "quiet" flag.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Jan Engelhardt [Tue, 27 Jan 2009 13:58:41 +0000 (14:58 +0100)]
libxtables: prefix/order - fw_xalloc
It is good practice to prefix names in a library some way so that
it does not clash with external programs' variable names right
on the first try.
This change: rename fw_[cm]alloc to xtables_[cm]alloc and
move the definition from internal.h to xtables.h to avoid
potential compiler warnings.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Jan Engelhardt [Tue, 27 Jan 2009 17:14:21 +0000 (18:14 +0100)]
extensions: use UINT_MAX constants over open-coded numbers (2/2)
Use the handy constants for ranges.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Jan Engelhardt [Tue, 27 Jan 2009 16:39:01 +0000 (17:39 +0100)]
extensions: use UINT_MAX constants over open-coded bits (1/2)
~0 depends on the sizeof(int), so it is better to use UINT32_MAX.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Jan Engelhardt [Tue, 27 Jan 2009 16:34:58 +0000 (17:34 +0100)]
libxt_owner: use correct UID/GID boundaries
-1 is a reserved number (chown uses it to denote "do not change"),
so the maximum libxt_owner should permit is up to UINT32_MAX-1.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Jan Engelhardt [Tue, 27 Jan 2009 16:24:34 +0000 (17:24 +0100)]
src: remove redundant casts
All of them are implicitly convertable without any wanted side effects.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Jan Engelhardt [Tue, 27 Jan 2009 16:16:26 +0000 (17:16 +0100)]
src: remove redundant returns at end of void-returning functions
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Bart De Schuymer [Mon, 26 Jan 2009 15:31:51 +0000 (16:31 +0100)]
man: fix physdev manpage
A sentence of the physdev module's help entry was truncated by the man
program because the line starts with a single quote.
Signed-off-by: Bart De Schuymer <bdschuym@pandora.be>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Daniel Drake [Mon, 19 Jan 2009 14:36:41 +0000 (15:36 +0100)]
libxt_owner: add more spaces to output
Commit
bb9284d1 ("libxt_owner: add spaces to output") moved the printing
of spaces away from the owner_mt_print() function family, but forgot to
add spaces in all of the print_item() functions that are called.
This is likely to be at least the partial cause of
https://bugs.gentoo.org/show_bug.cgi?id=254435
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Approves-of-this-patch: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Tue, 13 Jan 2009 14:30:10 +0000 (15:30 +0100)]
doc: augment ICMP manpage by type/code syntax
The ICMP match module also allows numeric type/code as in
"--icmp-type type/code". Document it.
Based upon a patch by Victor Stinner <vstinner@inl.fr>.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Jan Engelhardt [Mon, 12 Jan 2009 06:06:12 +0000 (07:06 +0100)]
doc: escape minus sign in manpage (2)
Addendum to previous patch.
Jan Engelhardt [Mon, 12 Jan 2009 06:22:18 +0000 (07:22 +0100)]
build: remove non-portable rule
> Makefile.am:97: `%'-style pattern rules are a GNU make extension
(iptables still requires GNU make for extensions/, because it is
so much easier to write.)
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 12 Jan 2009 06:21:20 +0000 (07:21 +0100)]
build: use regular = assignments in Makefile
Resolves warnings:
Makefile.am:7: `:='-style assignments are not portable
Makefile.am:71: `:='-style assignments are not portable
etc.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 12 Jan 2009 03:53:18 +0000 (04:53 +0100)]
doc: escape minus sign in manpages
groff formats '-' as a hyphen, and '\-' is needed for a minus.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Thu, 8 Jan 2009 17:04:40 +0000 (18:04 +0100)]
doc: resynchronize markup in iptables,ip6tables.8.in
Change .br to .PP in the intro section and use consistent
paragraphing in later ones.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Jan Engelhardt [Thu, 8 Jan 2009 17:03:45 +0000 (18:03 +0100)]
doc: put iptables version into manpage
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Jan Engelhardt [Wed, 7 Jan 2009 14:11:59 +0000 (15:11 +0100)]
build: resolve autotools suggestions
libtool2 wants to put files into m4, so let it have it.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Jan Engelhardt [Wed, 7 Jan 2009 13:43:47 +0000 (14:43 +0100)]
env: augment deprecation notice
Tell the user what to use instead of IP*TABLES_LIBDIR.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Jan Engelhardt [Tue, 30 Dec 2008 11:03:39 +0000 (12:03 +0100)]
rateest: guard against segfault
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Jan Engelhardt [Tue, 9 Dec 2008 14:06:20 +0000 (15:06 +0100)]
iptables-save: output ! in position according to manpage
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Sun, 7 Dec 2008 15:54:06 +0000 (16:54 +0100)]
src: remove unused include files
No .c files include any of these - in fact they seem to be remnants
missed during commit
b1f568309a09e61f892dee3c23279cecff0b0ff4 -
so remove them.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Wed, 26 Nov 2008 16:18:08 +0000 (17:18 +0100)]
libiptc: guard chain index allocation for different malloc implementations
Some libc implementations such as µClibc return NULL on malloc(0).
They are free to do that per C standard.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signeed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 24 Nov 2008 12:52:30 +0000 (13:52 +0100)]
doc: fix a typo in libip6t_REJECT.man
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Thu, 20 Nov 2008 09:15:35 +0000 (10:15 +0100)]
src: remove inclusion of iptables.h
iptables.h and ip6tables.h only include declarations internal to
iptables (specifically iptables.c and ip6tables.c), as most of the
public API has been moved to xtables.h a few months ago.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Pablo Neira Ayuso [Wed, 19 Nov 2008 18:01:26 +0000 (19:01 +0100)]
iptables: refer to dmesg when we hit error
This does not make any better, but at least refer to
dmesg which is the common source of information to diagnose
kernel-side problems. This is helpful for newbie users.
# iptables -I INPUT -j CLUSTERIP
iptables: Invalid argument. Run `dmesg' for more information.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Pablo Neira Ayuso [Wed, 19 Nov 2008 18:01:26 +0000 (19:01 +0100)]
state: report spaces in the state list parsing
This patch adds better error reporting when the user inserts a space
between two states with the --state option.
iptables -I INPUT -m state ESTABLISHED, RELATED
^
mind the space
results in:
iptables v1.4.2-rc1: Bad state `'
Try `iptables -h' or 'iptables --help' for more information.
Now this returns:
iptables v1.4.2-rc1: `--state' requires a list of states with no
spaces, e.g. ESTABLISHED,RELATED
This patch also applies to libxt_conntrack which has a copy of the
function.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Pablo Neira Ayuso [Wed, 19 Nov 2008 18:01:26 +0000 (19:01 +0100)]
iptables: fix error reporting with wrong/missing arguments
This patch fixes wrong error reporting when arguments are missing:
# iptables -I INPUT -m state --state
iptables v1.4.2-rc1: Unknown arg `(null)'
Try `iptables -h' or 'iptables --help' for more information.
or wrong:
# iptables -I INPUT -m state --xyz
iptables v1.4.2-rc1: Unknown arg `(null)'
Try `iptables -h' or 'iptables --help' for more information.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Jan Engelhardt [Tue, 18 Nov 2008 11:27:54 +0000 (12:27 +0100)]
src: use NFPROTO_ constants
Resync netfilter.h from the latest kernel and make use of the new
NFPROTO_ constants that have been introduced.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Tue, 18 Nov 2008 11:26:26 +0000 (12:26 +0100)]
src: reuse the global modprobe_program variable
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Patrick McHardy [Thu, 13 Nov 2008 15:38:01 +0000 (16:38 +0100)]
Bump version to 1.4.3-rc1
Jan Engelhardt [Wed, 12 Nov 2008 11:03:25 +0000 (12:03 +0100)]
libxt_conntrack: dump ctdir
Sent in as part of a larger private mail by Gáspár Lajos
<swifty@freemail.hu>; I cherry-picked the ctdir part.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 10 Nov 2008 16:25:55 +0000 (17:25 +0100)]
libiptc: make sockfd a per-handle thing
Get away from this singleton.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 10 Nov 2008 16:08:07 +0000 (17:08 +0100)]
libxt_conntrack: respect -n option during ruledump
Reference: http://bugs.debian.org/502548
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 10 Nov 2008 16:07:31 +0000 (17:07 +0100)]
libiptc: use hex output for hookmask
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 10 Nov 2008 16:01:24 +0000 (17:01 +0100)]
libiptc: remove unused iptc_get_raw_socket and iptc_check_packet
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 10 Nov 2008 16:00:41 +0000 (17:00 +0100)]
libiptc: remove indirections
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 10 Nov 2008 15:59:27 +0000 (16:59 +0100)]
libiptc: remove typedef indirection
Don't you hate it when iptc_handle_t *x actually is a double-indirection
struct iptc_handle **? This also shows the broken constness model, since
"const iptc_handle_t x" = "iptc_handle_t const x" =
"struct iptc_handle *const x", which is like no const at all.
Lots of things to do then.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Patrick McHardy [Tue, 4 Nov 2008 12:22:40 +0000 (13:22 +0100)]
Add SCTP/DCCP support to NAT targets
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Wed, 29 Oct 2008 08:48:59 +0000 (09:48 +0100)]
manpage: explain what rule-specification is
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Wed, 29 Oct 2008 08:48:23 +0000 (09:48 +0100)]
manpage: use separate paragraphs for command syntax
This makes it (IMO) easier to follow when the terminal is small and the
command line specifications begin to wrap.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Thomas Jarosch [Thu, 23 Oct 2008 13:41:27 +0000 (15:41 +0200)]
Fix compile warnings using gcc 4.3.2
libxt_dccp.c: In function 'port_to_service':
libxt_dccp.c:196: warning: implicit declaration of function 'htons'
libxt_sctp.c: In function 'port_to_service':
libxt_sctp.c:321: warning: implicit declaration of function 'htons'
libxt_tcp.c: In function 'port_to_service':
libxt_tcp.c:220: warning: implicit declaration of function 'htons'
libxt_udp.c: In function 'port_to_service':
libxt_udp.c:104: warning: implicit declaration of function 'htons'
Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Thomas Jarosch [Thu, 23 Oct 2008 13:40:52 +0000 (15:40 +0200)]
Fix compile error in libxt_iprange.c using gcc 4.3.2
In file included from libxt_iprange.c:9:
../include/linux/netfilter.h:43: error: field 'in' has incomplete type
../include/linux/netfilter.h:44: error: field 'in6' has incomplete type
libxt_iprange.c: In function 'parse_iprange':
libxt_iprange.c:46: error: dereferencing pointer to incomplete type
libxt_iprange.c:53: error: dereferencing pointer to incomplete type
libxt_iprange.c: In function 'iprange_mt4_parse':
libxt_iprange.c:117: error: dereferencing pointer to incomplete type
libxt_iprange.c:121: error: dereferencing pointer to incomplete type
libxt_iprange.c:136: error: dereferencing pointer to incomplete type
libxt_iprange.c:140: error: dereferencing pointer to incomplete type
libxt_iprange.c: In function 'iprange_mt6_parse':
libxt_iprange.c:167: error: dereferencing pointer to incomplete type
libxt_iprange.c:171: error: dereferencing pointer to incomplete type
libxt_iprange.c:186: error: dereferencing pointer to incomplete type
libxt_iprange.c:190: error: dereferencing pointer to incomplete type
Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Jan Engelhardt [Wed, 22 Oct 2008 16:53:57 +0000 (18:53 +0200)]
libxt_recent: add IPv6 support
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Wed, 22 Oct 2008 16:53:39 +0000 (18:53 +0200)]
Move libipt_recent to libxt_recent
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jirí Moravec [Wed, 22 Oct 2008 06:57:38 +0000 (08:57 +0200)]
libxt_TOS: fix compilation error
Fix compilation error caused by double definition of IPPROTO_SCTP:
In file included from /usr/include/netinet/ip.h:25,
from /usr/include/linux/ip.h:19,
from tos_values.c:4,
from libxt_TOS.c:15:
/usr/include/netinet/in.h:84: error: expected identifier before numeric constant
make[2]: *** [libxt_TOS.oo] Error 1
Signed-off-by: Patrick McHardy <kaber@trash.net>
KOVACS Krisztian [Wed, 15 Oct 2008 09:50:34 +0000 (11:50 +0200)]
Add iptables support for the socket match
Add user-space code for the socket match.
Signed-off-by: KOVACS Krisztian <hidden@sch.bme.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
KOVACS Krisztian [Wed, 15 Oct 2008 09:49:37 +0000 (11:49 +0200)]
Add iptables support for the TPROXY target
Signed-off-by: KOVACS Krisztian <hidden@sch.bme.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Patrick McHardy [Wed, 8 Oct 2008 16:31:58 +0000 (18:31 +0200)]
v1.4.2
Pablo Sebastian Greco [Mon, 29 Sep 2008 06:51:32 +0000 (08:51 +0200)]
mark: fix invalid iptables-save output
When a neg mark is saved via iptables-save it is saved as !--mark,
but this is not recognized by iptables-restore, just adding a
space to the saved file to make it look like "! --mark" makes
iptables-restore accept the file.
Signed-off-by: Pablo Sebastian Greco <pablo@fliagreco.com.ar>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Jesper Dangaard Brouer [Wed, 24 Sep 2008 15:32:43 +0000 (17:32 +0200)]
libiptc: remove old fixme
Chains _are_ sorted, binary search depend on it!
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 8 Sep 2008 13:42:41 +0000 (15:42 +0200)]
doc: remove mentions of NAT in ip6tables manpage
ip6tables does not support NAT at this time.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 8 Sep 2008 13:42:06 +0000 (15:42 +0200)]
build: run ldconfig on `make install`
Reporeted-by: Brent Clark <brentgclarklist@gmail.com>
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Thu, 4 Sep 2008 15:49:18 +0000 (17:49 +0200)]
src: update comments part II
A number of comments are redundant, some outdated and others outright
wrong in their own way. Remove and fixup.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Patrick McHardy [Mon, 1 Sep 2008 13:11:06 +0000 (15:11 +0200)]
manpages: fix another typo in tcp manpage
WANG Cong [Mon, 1 Sep 2008 13:10:00 +0000 (15:10 +0200)]
manpages: Fix a typo in tcp man page
Signed-off-by: WANG Cong <wangcong@zeuux.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Phil Oester [Mon, 1 Sep 2008 13:07:26 +0000 (15:07 +0200)]
src: Missing limits.h includes
Latest git doesn't compile for me on Fedora 9 due to various *MAX constants
being undefined. Below adds the include in 3 files which need it (although
I can't see why this isn't required in 1.4.1.1).
Signed-off-by: Phil Oester <kernel@linuxace.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 1 Sep 2008 12:28:12 +0000 (14:28 +0200)]
libxt_recent: do allow --rttl for --update
Tony Ho noticed a too-strict check in xt_recent, so here is a fix.
Reported-by: Tony Ho <iptables@iblink.com.cn>
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 1 Sep 2008 12:27:19 +0000 (14:27 +0200)]
build: prepare make tarball for git 1.6.0
Git 1.6.0 will not have the dashful forms anymore.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 1 Sep 2008 12:22:19 +0000 (14:22 +0200)]
src: Update comments
A number of comments are redundant, some outdated and others outright
wrong in their own way. Remove and fixup.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 1 Sep 2008 12:20:13 +0000 (14:20 +0200)]
src: use regular includes
iptables ships with all header files and prioritized its own include
directory over /usr/include/linux, so just use the normal brackets.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 1 Sep 2008 12:19:03 +0000 (14:19 +0200)]
libxt_iprange: fix option names
There is no --src-ip, just --src-range. (Same for --dst-range.)
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 1 Sep 2008 12:18:01 +0000 (14:18 +0200)]
libxt_mac: flatten casts in libxt_mac
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Fri, 15 Aug 2008 20:13:57 +0000 (22:13 +0200)]
manpages: add missing rateest match documentation
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Jan Engelhardt [Fri, 15 Aug 2008 17:36:54 +0000 (19:36 +0200)]
manpages: add missing rateest documentation
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Jan Engelhard [Fri, 15 Aug 2008 11:51:10 +0000 (13:51 +0200)]
build: fix iptables-static build
Commit
126c1361ad5201973e6ebc761b3e38a67915de29 unfortunately broke
building iptables-static due to listing iptables.c twice. Fix this.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Jan Engelhardt [Wed, 13 Aug 2008 12:44:30 +0000 (14:44 +0200)]
manpages: add missing --rsource,--rdest options to libxt_recent.man
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Wed, 13 Aug 2008 12:43:56 +0000 (14:43 +0200)]
build: fix initext.c dependency
initext?.c is generated within the current directory, not in ${srcdir}.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Wed, 13 Aug 2008 12:43:22 +0000 (14:43 +0200)]
build: fix dependency tracking for xtables.h.in
For files to be correctly regenerated after the .in file has been
touched, an explicit extra dependency is needed in the Makefile.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Wed, 13 Aug 2008 12:42:41 +0000 (14:42 +0200)]
Synchronize invert flag order with manpages
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Wed, 13 Aug 2008 12:41:32 +0000 (14:41 +0200)]
Warn about use of DROP in nat table
Consensus is that we should warn for now.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Wed, 13 Aug 2008 12:40:18 +0000 (14:40 +0200)]
physdev: remove extra space in output
Just a cosmetic fix for `iptables -S` and `iptables-save` printing
two spaces between arguments in the physdev match.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Tue, 12 Aug 2008 09:42:04 +0000 (11:42 +0200)]
manpages: correct erroneous markup
Text paragraphs should use .PP, since .TP makes it a list item with
indented description.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Jan Engelhardt [Mon, 4 Aug 2008 16:37:38 +0000 (18:37 +0200)]
Put xtables.c into its own library, libxtables.so
iproute2's tc's m_ipt.c poses as a pseudo-iptables program to make
use of the info structure composition of iptables extensions.
Since tc would have to clone a lot of code, xtables.c is put into
its own shared library and should not be relied upon by any other
programs.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Phil Oester [Mon, 4 Aug 2008 11:30:30 +0000 (13:30 +0200)]
libxt_dscp: fix save of negated dscp match rules
As pointed out by Vyacheslav Garashchenko, iptables-save does not
save negated dscp matches properly. Fix below.
This closes bugzilla #533.
Phil
Signed-off-by: Phil Oester <kernel@linuxace.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Phil Oester [Mon, 4 Aug 2008 11:28:07 +0000 (13:28 +0200)]
iptables-save: fix hashlimit output
In bugzilla 550, Xeb notes that the --hashlimit-htable-gcinterval
argument is saved incorrectly. Patch below corrects.
Patch-from: Xeb <xeb@mail.ru>
Signed-off-by: Phil Oester <kernel@linuxace.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 4 Aug 2008 10:52:27 +0000 (12:52 +0200)]
libxt_recent: do not allow both --set and --rttl
Reported-by: Erich Schubert <erich@debian.org>
Reference: Debian bug #346034
"I was using the --rttl option in my --set line; this caused all
incoming ssh connections to be rejected; --rttl is only to be used
with --rcheck and --update."
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 4 Aug 2008 10:51:01 +0000 (12:51 +0200)]
iptables-restore: fix segmentation fault with -tanything
Reference: Debian bug #458042
iptables-restore must not pass a table into do_command. It checks for
"-t arg" and "--table arg", but not "-targ". (On a related note,
using -targ does not work as expected).
This should fail gracefully, but crashes:
iptables-restore <(echo -e '*filter\n-A INPUT -tx\nCOMMIT')
And this should use table "filter", or perhaps raise an error, but
instead sets the table to (literally) "-tfilter":
iptables -tfilter -A INPUT
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 4 Aug 2008 10:48:34 +0000 (12:48 +0200)]
src: drop libiptc from installation
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Mon, 4 Aug 2008 10:47:48 +0000 (12:47 +0200)]
src: remove dependency on libiptc headers
xtables.h does not need really need libxtc.h, and we can drop it from
the install as it is internal-only.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Wed, 30 Jul 2008 10:49:47 +0000 (12:49 +0200)]
manpages: name and markup fixes
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Jan Engelhardt [Tue, 29 Jul 2008 17:04:34 +0000 (19:04 +0200)]
Merge branch 'master' of vishnu.netfilter.org:/data/git/iptables