]> git.ipfire.org Git - thirdparty/iptables.git/log
thirdparty/iptables.git
12 years agoextensions: libxt_owner: add unit test
Pablo Neira Ayuso [Wed, 26 Sep 2012 16:56:48 +0000 (18:56 +0200)] 
extensions: libxt_owner: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libip6t_DNAT: add unit test
Pablo Neira Ayuso [Wed, 26 Sep 2012 16:51:55 +0000 (18:51 +0200)] 
extensions: libip6t_DNAT: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libipt_SNAT: add unit test
Pablo Neira Ayuso [Wed, 26 Sep 2012 16:47:58 +0000 (18:47 +0200)] 
extensions: libipt_SNAT: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_TEE: add unit test
Pablo Neira Ayuso [Wed, 26 Sep 2012 16:44:27 +0000 (18:44 +0200)] 
extensions: libxt_TEE: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_physdev: add unit test
Pablo Neira Ayuso [Wed, 26 Sep 2012 17:08:28 +0000 (19:08 +0200)] 
extensions: libxt_physdev: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_iprange: add unit test
Pablo Neira Ayuso [Wed, 26 Sep 2012 16:41:39 +0000 (18:41 +0200)] 
extensions: libxt_iprange: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_quota: add unit test
Pablo Neira Ayuso [Wed, 26 Sep 2012 16:37:45 +0000 (18:37 +0200)] 
extensions: libxt_quota: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_cpu: add unit test
Pablo Neira Ayuso [Wed, 26 Sep 2012 16:34:08 +0000 (18:34 +0200)] 
extensions: libxt_cpu: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_dscp: add unit test
Pablo Neira Ayuso [Wed, 26 Sep 2012 16:31:03 +0000 (18:31 +0200)] 
extensions: libxt_dscp: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libip6t_REJECT: add unit test
Pablo Neira Ayuso [Wed, 26 Sep 2012 16:29:11 +0000 (18:29 +0200)] 
extensions: libip6t_REJECT: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_multiport: add unit test
Pablo Neira Ayuso [Wed, 26 Sep 2012 16:24:34 +0000 (18:24 +0200)] 
extensions: libxt_multiport: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libipt_ULOG: add unit test
Pablo Neira Ayuso [Wed, 26 Sep 2012 15:46:44 +0000 (17:46 +0200)] 
extensions: libipt_ULOG: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_conntrack: add unit test
Pablo Neira Ayuso [Wed, 26 Sep 2012 15:36:55 +0000 (17:36 +0200)] 
extensions: libxt_conntrack: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_limit: add unit test
Pablo Neira Ayuso [Mon, 24 Sep 2012 14:01:38 +0000 (16:01 +0200)] 
extensions: libxt_limit: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libip6t_eui64: add unit test
Pablo Neira Ayuso [Mon, 24 Sep 2012 13:48:21 +0000 (15:48 +0200)] 
extensions: libip6t_eui64: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_DSCP: add unit test
Pablo Neira Ayuso [Mon, 24 Sep 2012 13:44:35 +0000 (15:44 +0200)] 
extensions: libxt_DSCP: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_TOS: add unit test
Pablo Neira Ayuso [Sun, 23 Sep 2012 22:50:38 +0000 (00:50 +0200)] 
extensions: libxt_TOS: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_TRACE: add unit test
Pablo Neira Ayuso [Fri, 21 Sep 2012 16:34:02 +0000 (18:34 +0200)] 
extensions: libxt_TRACE: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libipt_ECN: add unit test
Pablo Neira Ayuso [Fri, 21 Sep 2012 16:27:32 +0000 (18:27 +0200)] 
extensions: libipt_ECN: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_standard: add unit test
Pablo Neira Ayuso [Fri, 21 Sep 2012 16:24:23 +0000 (18:24 +0200)] 
extensions: libxt_standard: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libipt_MASQUERADE: add unit test
Pablo Neira Ayuso [Fri, 21 Sep 2012 13:59:36 +0000 (15:59 +0200)] 
extensions: libipt_MASQUERADE: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_NOTRACK: add unit test
Pablo Neira Ayuso [Fri, 21 Sep 2012 13:56:34 +0000 (15:56 +0200)] 
extensions: libxt_NOTRACK: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_sctp: add unit test
Pablo Neira Ayuso [Fri, 21 Sep 2012 13:31:31 +0000 (15:31 +0200)] 
extensions: libxt_sctp: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libipt_REJECT: add unit test
Pablo Neira Ayuso [Wed, 19 Sep 2012 23:43:19 +0000 (01:43 +0200)] 
extensions: libipt_REJECT: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_mark: add unit test
Pablo Neira Ayuso [Wed, 19 Sep 2012 23:40:29 +0000 (01:40 +0200)] 
extensions: libxt_mark: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_nfacct: add unit test
Pablo Neira Ayuso [Wed, 19 Sep 2012 23:33:43 +0000 (01:33 +0200)] 
extensions: libxt_nfacct: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_rateest: add unit test
Pablo Neira Ayuso [Mon, 10 Sep 2012 10:38:35 +0000 (12:38 +0200)] 
extensions: libxt_rateest: add unit test

based on tests/options-most.rules

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_string: add unit test
Pablo Neira Ayuso [Tue, 18 Sep 2012 00:30:26 +0000 (02:30 +0200)] 
extensions: libxt_string: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_state: add unit test
Pablo Neira Ayuso [Mon, 17 Sep 2012 17:03:29 +0000 (19:03 +0200)] 
extensions: libxt_state: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_CT: add unit test
Pablo Neira Ayuso [Mon, 17 Sep 2012 16:57:55 +0000 (18:57 +0200)] 
extensions: libxt_CT: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_pkttype: add unit test
Pablo Neira Ayuso [Thu, 13 Sep 2012 13:40:55 +0000 (15:40 +0200)] 
extensions: libxt_pkttype: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libipt_ttl.t: add unit test
Pablo Neira Ayuso [Thu, 13 Sep 2012 13:37:36 +0000 (15:37 +0200)] 
extensions: libipt_ttl.t: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_NFQUEUE: add unit test
Pablo Neira Ayuso [Thu, 13 Sep 2012 13:31:52 +0000 (15:31 +0200)] 
extensions: libxt_NFQUEUE: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libipt_icmp: add unit test
Pablo Neira Ayuso [Thu, 13 Sep 2012 13:09:16 +0000 (15:09 +0200)] 
extensions: libipt_icmp: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_helper: add unit test
Pablo Neira Ayuso [Thu, 13 Sep 2012 13:00:07 +0000 (15:00 +0200)] 
extensions: libxt_helper: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_esp: add unit test
Pablo Neira Ayuso [Wed, 12 Sep 2012 16:28:33 +0000 (18:28 +0200)] 
extensions: libxt_esp: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_dccp: add unit test
Pablo Neira Ayuso [Wed, 12 Sep 2012 16:21:53 +0000 (18:21 +0200)] 
extensions: libxt_dccp: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_NFLOG: add unit test
Pablo Neira Ayuso [Wed, 12 Sep 2012 10:59:41 +0000 (12:59 +0200)] 
extensions: libxt_NFLOG: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_tos: add unit test
Pablo Neira Ayuso [Wed, 12 Sep 2012 10:42:19 +0000 (12:42 +0200)] 
extensions: libxt_tos: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_tcp: add unit test
Pablo Neira Ayuso [Wed, 12 Sep 2012 10:41:47 +0000 (12:41 +0200)] 
extensions: libxt_tcp: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_udp: add unit test
Pablo Neira Ayuso [Wed, 12 Sep 2012 10:39:28 +0000 (12:39 +0200)] 
extensions: libxt_udp: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_length: add unit test
Pablo Neira Ayuso [Mon, 10 Sep 2012 10:54:16 +0000 (12:54 +0200)] 
extensions: libxt_length: add unit test

based on tests/options-most.rules

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_time: add unit test
Pablo Neira Ayuso [Mon, 10 Sep 2012 10:51:38 +0000 (12:51 +0200)] 
extensions: libxt_time: add unit test

based on tests/options-most.rules

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_hashlimit: add unit test
Pablo Neira Ayuso [Mon, 10 Sep 2012 10:36:55 +0000 (12:36 +0200)] 
extensions: libxt_hashlimit: add unit test

based on tests/options-most.rules

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_CONNMARK: add unit test
Pablo Neira Ayuso [Mon, 10 Sep 2012 09:37:22 +0000 (11:37 +0200)] 
extensions: libxt_CONNMARK: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_connmark: add unit test
Pablo Neira Ayuso [Mon, 10 Sep 2012 09:31:32 +0000 (11:31 +0200)] 
extensions: libxt_connmark: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_connlimit: add unit test
Pablo Neira Ayuso [Sun, 9 Sep 2012 20:42:36 +0000 (22:42 +0200)] 
extensions: libxt_connlimit: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_connbytes: add unit test
Pablo Neira Ayuso [Fri, 7 Sep 2012 15:56:38 +0000 (17:56 +0200)] 
extensions: libxt_connbytes: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_CLASSIFY: add unit test
Pablo Neira Ayuso [Fri, 7 Sep 2012 15:42:59 +0000 (17:42 +0200)] 
extensions: libxt_CLASSIFY: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_CHECKSUM: add unit test
Pablo Neira Ayuso [Fri, 7 Sep 2012 15:27:09 +0000 (17:27 +0200)] 
extensions: libxt_CHECKSUM: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_AUDIT: add unit test
Pablo Neira Ayuso [Fri, 7 Sep 2012 14:44:28 +0000 (16:44 +0200)] 
extensions: libxt_AUDIT: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_comment: add unit test
Pablo Neira Ayuso [Wed, 5 Sep 2012 09:56:34 +0000 (11:56 +0200)] 
extensions: libxt_comment: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_cluster: add unit test
Pablo Neira Ayuso [Wed, 5 Sep 2012 09:52:24 +0000 (11:52 +0200)] 
extensions: libxt_cluster: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libip6t_LOG: add unit test
Pablo Neira Ayuso [Wed, 5 Sep 2012 09:48:56 +0000 (11:48 +0200)] 
extensions: libip6t_LOG: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_addrtype: add unit test
Pablo Neira Ayuso [Wed, 5 Sep 2012 08:54:53 +0000 (10:54 +0200)] 
extensions: libxt_addrtype: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libipt_LOG: add unit test
Pablo Neira Ayuso [Tue, 4 Sep 2012 16:18:22 +0000 (18:18 +0200)] 
extensions: libipt_LOG: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libip6t_ah: add unit test
Pablo Neira Ayuso [Tue, 4 Sep 2012 15:02:21 +0000 (17:02 +0200)] 
extensions: libip6t_ah: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libipt_ah: add unit test
Pablo Neira Ayuso [Tue, 4 Sep 2012 14:04:28 +0000 (16:04 +0200)] 
extensions: libipt_ah: add unit test

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoadd iptables unit test infrastructure
Pablo Neira Ayuso [Tue, 21 Aug 2012 17:43:09 +0000 (19:43 +0200)] 
add iptables unit test infrastructure

This patch adds a python script to verify unit test cases.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoiptables: extensions/GNUMakefile.in use CPPFLAGS
Laurence J. Lane [Thu, 22 Aug 2013 16:44:47 +0000 (12:44 -0400)] 
iptables: extensions/GNUMakefile.in use CPPFLAGS

"All other Makefiles add CPPFLAGS to ${COMPILE} (automake), but GNUmakefile.in
 doesn't set it."

http://bugs.debian.org/665286

Signed-off-by: Laurence J. Lane <ljlane@debian.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_LOG: use generic syslog reference in manpage
Laurence J. Lane [Fri, 6 Sep 2013 21:46:00 +0000 (17:46 -0400)] 
extensions: libxt_LOG: use generic syslog reference in manpage

Fedora, ArchLinux, Ubuntu, and Debian, at the least, use
alternative syslog daemons by default these days. Let's make
the syslog reference generic.

Reference: http://bugs.debian.org/567564

Signed-off-by: Laurence J. Lane <ljlane@debian.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agolibxtables: xtables_ipmask_to_numeric incorrect with non-CIDR masks
Phil Oester [Thu, 26 Sep 2013 16:06:58 +0000 (09:06 -0700)] 
libxtables: xtables_ipmask_to_numeric incorrect with non-CIDR masks

As pointed out by Peter Hoelsken, rules created with non-standard
masks such as 0.255.0.0, 0.0.255.0, etc. are displayed when output
with iptables -L in CIDR notation as -1.  This is because the cidr
variable in xtables_ipmask_to_numeric is unsigned, and the return
value of -1 from xtables_ipmask_to_cidr is therefore converted to
UINT_MAX. Add a cast to workaround the issue.

This closes netfilter bugzilla #854.

Signed-off-by: Phil Oester <kernel@linuxace.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoiptables: libxt_string.man add examples
Laurence J. Lane [Sat, 24 Aug 2013 21:37:55 +0000 (17:37 -0400)] 
iptables: libxt_string.man add examples

Add usage examples for string and hex string patterns.

References: http://bugs.debian.org/699904
Signed-off-by: Laurence J. Lane <ljlane@debian.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
12 years agoiptables: libxt_recent.{c,man} dead URL
Laurence J. Lane [Fri, 23 Aug 2013 20:55:55 +0000 (16:55 -0400)] 
iptables: libxt_recent.{c,man} dead URL

Remove it.

Signed-off-by: Laurence J. Lane <ljlane@debian.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
12 years agobuild: add software version to manpage first line at configure stage
Pablo Neira Ayuso [Thu, 22 Aug 2013 11:11:45 +0000 (13:11 +0200)] 
build: add software version to manpage first line at configure stage

This patch adds the software version to the first line of the
following manpages:

iptables-save.8
iptables-restore.8
iptables-apply.8
iptables-xml.1

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoiptables: iptables-xm1.1 correct man section
Laurence J. Lane [Mon, 19 Aug 2013 16:54:35 +0000 (12:54 -0400)] 
iptables: iptables-xm1.1 correct man section

iptables-xml.8 was moved to iptables-xm1.1.

Signed-off-by: Laurence J. Lane <ljlane@debian.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoiptables: libip(6)t_REJECT.man default icmp types
Laurence J. Lane [Sun, 18 Aug 2013 23:41:40 +0000 (19:41 -0400)] 
iptables: libip(6)t_REJECT.man default icmp types

The extension man page shows "port-unreach" and "port-unreachable" as
default icmpv6 and icomp reject-with types. Either and variations work
fine for writing rules, but they are displayed as "icmp6-port-unreachable"
and "icmp-port-unreachable". Let's make that consistent.

http://bugs.debian.org/644819

Signed-off-by: Laurence J. Lane <ljlane@debian.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoiptables: libxt_conntrack.man extraneous commas
Laurence J. Lane [Sun, 18 Aug 2013 19:44:13 +0000 (15:44 -0400)] 
iptables: libxt_conntrack.man extraneous commas

The first might work. The second doesn't.

(The other corrections in the bug report are already implemented.)

http://bugs.debian.org/654983

Signed-off-by: Laurence J. Lane <ljlane@debian.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoiptables: libxt_hashlimit.man: correct address
Laurence J. Lane [Sat, 17 Aug 2013 23:08:59 +0000 (19:08 -0400)] 
iptables: libxt_hashlimit.man: correct address

Corrects an example address with subnet mask.

http://bugs.debian.org/698393

Signed-off-by: Laurence J. Lane <ljlane@debian.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoip[6]tables: fix incorrect alignment in commands_v_options
Pablo Neira Ayuso [Fri, 9 Aug 2013 16:00:22 +0000 (18:00 +0200)] 
ip[6]tables: fix incorrect alignment in commands_v_options

CMD_ZERO_NUM is 14, so it has to be defined in position 15 in the
commands_v_options array. This does not manifests easily since
commands from 9 to 14 have a very similar pattern in such array.

Based on this patch: http://patchwork.ozlabs.org/patch/188153/

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoMerge branch 'stable-1.4.20'
Pablo Neira Ayuso [Thu, 8 Aug 2013 16:16:36 +0000 (18:16 +0200)] 
Merge branch 'stable-1.4.20'

To retrieve:

iptables: state match incompatibilty across versions

12 years agoiptables: state match incompatibilty across versions
Phil Oester [Wed, 7 Aug 2013 23:44:49 +0000 (16:44 -0700)] 
iptables: state match incompatibilty across versions

As reported in Debian bug #718810 [1], state match rules added in < 1.4.16
iptables versions are incorrectly displayed by >= 1.4.16 iptables versions.
Issue bisected to commit 0d701631 (libxt_state: replace as an alias to
xt_conntrack).

Fix this by adding the missing .print and .save functions for state match
aliases in the conntrack match.

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718810

Signed-off-by: Phil Oester <kernel@linuxace.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoMerge branch 'stable-1.4.20'
Pablo Neira Ayuso [Thu, 8 Aug 2013 10:37:31 +0000 (12:37 +0200)] 
Merge branch 'stable-1.4.20'

To retrieve:

iptables: correctly reference generated file

12 years agoiptables: correctly reference generated file
Lutz Jaenicke [Wed, 7 Aug 2013 08:09:16 +0000 (10:09 +0200)] 
iptables: correctly reference generated file

Since (14bca55 iptables: use autoconf to process .in man pages),
the file "iptables-extensions.8.tmpl" is generated from
"iptables-extensions.8.tmpl.in" and is consequently no
longer found in ${srcdir} but in the build directory.
(Becomes visible with builddir != srcdir)

Signed-off-by: Lutz Jaenicke <ljaenicke@innominate.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoxtables: trivial spelling fix
stephen hemminger [Sun, 4 Aug 2013 22:08:26 +0000 (15:08 -0700)] 
xtables: trivial spelling fix

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agodoc: merge ip6table man pages into ipv4 ones
Florian Westphal [Sun, 14 Jul 2013 17:32:12 +0000 (19:32 +0200)] 
doc: merge ip6table man pages into ipv4 ones

a couple of improvements to the iptables man page never made it into
ip6tables version.

The number of differences between these two files is so small that
it seems preferable to alias the ipv6 man pages to their ipv4 counterpart
and change iptables man page to specifically document differences
(e.g. lack of ip6tables -f, etc).

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agodoc: add libnetfilter_queue pointer to libxt_NFQUEUE.man
Florian Westphal [Fri, 12 Jul 2013 21:14:27 +0000 (23:14 +0200)] 
doc: add libnetfilter_queue pointer to libxt_NFQUEUE.man

... and remove the QUEUE snippets from ip(6)tables man page,
the queue target was replaced by nfqueue years ago.
Fix up a couple of needless differences in ip(6)tables.8, too.

Signed-off-by: Florian Westphal <fw@strlen.de>
12 years agoextensions: libxt_socket: update man page
Florian Westphal [Fri, 12 Jul 2013 21:29:28 +0000 (23:29 +0200)] 
extensions: libxt_socket: update man page

Document --nowildcard option and its implications when using -m socket
to intercept packets.

While at it, update man page with Balazs Scheidlers comments from
nf_tproxy_core.h in kernel tree to better explain how lookup is performed.

Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
12 years agoxt_socket: add --nowildcard flag
Eric Dumazet [Thu, 20 Jun 2013 12:52:35 +0000 (05:52 -0700)] 
xt_socket: add --nowildcard flag

xt_socket module can be a nice replacement to conntrack module
in some cases (SYN filtering for example)

But it lacks the ability to match the 3rd packet of TCP
handshake (ACK coming from the client).

Add a XT_SOCKET_NOWILDCARD flag to disable the wildcard mechanism

The wildcard is the legacy socket match behavior, that ignores
LISTEN sockets bound to INADDR_ANY (or ipv6 equivalent)

iptables -I INPUT -p tcp --syn -j SYN_CHAIN
iptables -I INPUT -m socket -j ACCEPT

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoiptables 1.4.20 release v1.4.20
Pablo Neira Ayuso [Tue, 6 Aug 2013 15:48:43 +0000 (17:48 +0200)] 
iptables 1.4.20 release

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoiptables-xml: fix parameter parsing (similar to 2165f38)
Pablo Neira Ayuso [Fri, 26 Jul 2013 14:38:55 +0000 (16:38 +0200)] 
iptables-xml: fix parameter parsing (similar to 2165f38)

Similar to (2165f38 iptables-restore: fix parameter parsing
(shows up with gcc-4.7)), make sure iptables-xml doesn't hit
the same problem.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoiptables: iptables-xml: Fix various parsing bugs
Phil Oester [Thu, 20 Jun 2013 12:53:36 +0000 (08:53 -0400)] 
iptables: iptables-xml: Fix various parsing bugs

There are two bugs in iptables-xml do_rule_part parsing corrected by this patch:

1) Ignore "-A <chain>" instead of just "-A"
2) When checking to see if we need a <match> tag, inversion needs to be taken
   into account

This closes netfilter bugzilla #679.

Signed-off-by: Phil Oester <kernel@linuxace.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agobuild: fail in configure on missing dependency with --enable-bpf-compiler
Willem de Bruijn [Mon, 22 Jul 2013 00:02:38 +0000 (20:02 -0400)] 
build: fail in configure on missing dependency with --enable-bpf-compiler

The build of utils/nfbpf_compile depends on libpcap. If configure is
run with --enable-bpf-compiler, the script succeeds, but make fails.

This small patch adds a test for the dependency (libpcap) in configure
and fails hard if not found.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agobuild: additional include path required after UAPI changes
Phil Oester [Sun, 21 Jul 2013 15:30:49 +0000 (08:30 -0700)] 
build: additional include path required after UAPI changes

After kernel commit 607ca46e (UAPI: (Scripted) Disintegrate
include/linux), using the "--with-kernel" argument to build iptables
stopped working due to the missing #ifdefs in the original files.
We need to make sure the UAPI include dir is listed before the
original location. Leaving both allows support for old and new
kernels.

This fixes bug #833.

Signed-off-by: Phil Oester <kernel@linuxace.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agolibxt_CT: Add the "NOTRACK" alias
Jozsef Kadlecsik [Mon, 28 Jan 2013 20:32:55 +0000 (21:32 +0100)] 
libxt_CT: Add the "NOTRACK" alias

Available since Linux kernel 3.8.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agolibip6t_LOG: target output is different to libipt_LOG
Phil Oester [Sat, 6 Jul 2013 15:56:01 +0000 (08:56 -0700)] 
libip6t_LOG: target output is different to libipt_LOG

libipt_LOG is using the xtables_save_string func, which
escapes unsafe characters as needed. libip6t_LOG should
do the same.

Signed-off-by: Phil Oester <kernel@linuxace.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agolibxt_recent: restore minimum value for --seconds
Pablo Neira Ayuso [Mon, 15 Jul 2013 10:14:55 +0000 (12:14 +0200)] 
libxt_recent: restore minimum value for --seconds

This checking was accidentally removed in (74ded72 libxt_recent:
add --mask netmask).

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoextensions: libxt_connlabel: use libnetfilter_conntrack
Florian Westphal [Mon, 15 Jul 2013 14:35:08 +0000 (16:35 +0200)] 
extensions: libxt_connlabel: use libnetfilter_conntrack

Pablo suggested to make it depend on lnf-conntrack, and get rid of
the example config file as well.

The problem is that the file must be in a fixed path,
/etc/xtables/connlabel.conf, else userspace needs to "guess-the-right-file"
when translating names to their bit values (and vice versa).

Originally "make install" did put an example file into /etc/xtables/,
but distributors complained about iptables ignoring the sysconfdir.

So rather remove the example file, the man-page explains the format,
and connlabels are inherently system-specific anyway.

Signed-off-by: Florian Westphal <fw@strlen.de>
12 years agoextensions: libipt_ULOG: man page should mention NFLOG as replacement
Florian Westphal [Fri, 12 Jul 2013 21:20:50 +0000 (23:20 +0200)] 
extensions: libipt_ULOG: man page should mention NFLOG as replacement

Signed-off-by: Florian Westphal <fw@strlen.de>
12 years agolibxt_recent: restore reap functionality to recent module
Russell Senior [Sat, 13 Jul 2013 10:08:07 +0000 (10:08 +0000)] 
libxt_recent: restore reap functionality to recent module

The reap functionality appears to have been accidentally disabled
by (74ded72 libxt_recent: add --mask netmask) since iptables 1.4.15
and later.  This adds a patch to restore reap functionality for
recent_opts_v1.

Patch obtained via: http://patchwork.openwrt.org/patch/3812/

Signed-off-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoip{6}tables-restore: fix breakage due to new locking approach
Pablo Neira Ayuso [Mon, 8 Jul 2013 17:34:12 +0000 (19:34 +0200)] 
ip{6}tables-restore: fix breakage due to new locking approach

Since (93587a0 ip[6]tables: Add locking to prevent concurrent instances),
ip{6}tables-restore does not work anymore:

iptables-restore < x
Another app is currently holding the xtables lock. Perhaps you want to use the -w option?

do_command{6}(...) is called from ip{6}tables-restore for every iptables
command contained in the rule-set file. Thus, hitting the lock error
after the second command.

Fix it by bypassing the locking in the ip{6}tables-restore path.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoip6tables: don't print out /128
Phil Oester [Thu, 20 Jun 2013 20:11:38 +0000 (16:11 -0400)] 
ip6tables: don't print out /128

Similar to how iptables does not print /32 on IPv4 addresses, ip6tables
should not print out /128 on IPv6 addresses.

Signed-off-by: Phil Oester <kernel@linuxace.com>
Signed-off-by: Pablo Neira Ayuso <pablo@soleta.eu>
12 years agodoc: clarify DEBUG usage macro
Alexey Perevalov [Thu, 4 Jul 2013 07:26:17 +0000 (11:26 +0400)] 
doc: clarify DEBUG usage macro

Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com>
Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
12 years agoMerge branch 'stable'
Pablo Neira Ayuso [Wed, 12 Jun 2013 08:01:23 +0000 (10:01 +0200)] 
Merge branch 'stable'

Get c545933 iptables: Fix connlabel.conf install location

12 years agoiptables: Fix connlabel.conf install location
Phil Oester [Mon, 10 Jun 2013 09:35:44 +0000 (05:35 -0400)] 
iptables: Fix connlabel.conf install location

As reported by Danny Rawlins in bug #828, connlabel.conf is
unconditionally installed in /etc/xtables instead of using
prefix set at configure time. Fix to use sysconfdir variable.

This closes bugzilla #828.

Signed-off-by: Phil Oester <kernel@linuxace.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoip[6]tables: Add locking to prevent concurrent instances
Phil Oester [Fri, 31 May 2013 13:07:04 +0000 (09:07 -0400)] 
ip[6]tables: Add locking to prevent concurrent instances

There have been numerous complaints and bug reports over the years when admins
attempt to run more than one instance of iptables simultaneously.  Currently
open bug reports which are related:

325: Parallel execution of the iptables is impossible
758: Retry iptables command on transient failure
764: Doing -Z twice in parallel breaks counters
822: iptables shows negative or other bad packet/byte counts

As Patrick notes in 325:  "Since this has been a problem people keep running
into, I'd suggest to simply add some locking to iptables to catch the most
common case."

I started looking into alternatives to add locking, and of course the most
common/obvious solution is to use a pidfile.  But this has various downsides,
such as if the application is terminated abnormally and the pidfile isn't
cleaned up.  And this also requires a writable filesystem.  Using a UNIX domain
socket file (e.g. in /var/run) has similar issues.

Starting in 2.2, Linux added support for abstract sockets.  These sockets
require no filesystem, and automatically disappear once the application
terminates.  This is the locking solution I chose to implement in ip[6]tables.
As an added bonus, since each network namespace has its own socket pool, an
ip[6]tables instance running in one namespace will not lock out an ip[6]tables
instance running in another namespace.  A filesystem approach would have
to recognize and handle multiple network namespaces.

Signed-off-by: Phil Oester <kernel@linuxace.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 years agoIntroduce a new revision for the set match with the counters support
Jozsef Kadlecsik [Tue, 30 Apr 2013 22:56:35 +0000 (00:56 +0200)] 
Introduce a new revision for the set match with the counters support

The revision add the support of matching the packet/byte counters
if the set was defined with the extension. Also, a new flag is
introduced to suppress updating the packet/byte counters if required.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
12 years agoextensions: libxt_LOG: rename IPv4 manpage and tell about IPv6 support
Mart Frauenlob [Wed, 10 Apr 2013 06:47:32 +0000 (06:47 +0000)] 
extensions: libxt_LOG: rename IPv4 manpage and tell about IPv6 support

Signed-off-by: Mart Frauenlob <mart.frauenlob@chello.at>
Signed-off-by: Florian Westphal <fw@strlen.de>
12 years agoextensions: libxt_MASQUERADE: rename IPv4 manpage and tell about IPv6 support
Mart Frauenlob [Wed, 10 Apr 2013 06:45:08 +0000 (06:45 +0000)] 
extensions: libxt_MASQUERADE: rename IPv4 manpage and tell about IPv6 support

also update list of protocols valid for port mapping.

Signed-off-by: Mart Frauenlob <mart.frauenlob@chello.at>
Signed-off-by: Florian Westphal <fw@strlen.de>
12 years agoconfigure: display summary
Eric Leblond [Wed, 5 Jun 2013 02:16:25 +0000 (04:16 +0200)] 
configure: display summary

This patch adds a message at the end of configure which displays
the different compilation options and system settings.

An example output is the following:

Iptables Configuration:
  IPv4 support: yes
  IPv6 support: yes
  Devel support: yes
  IPQ support: no
  Large file support: yes
  BPF utils support: no

Build parameters:
  Put plugins into executable (static): no
  Support plugins via dlopen (shared): yes
  Installation prefix (--prefix): /usr/local
  Xtables extension directory: /usr/local/lib/xtables
  Pkg-config directory: /usr/local/lib/pkgconfig
  Kernel build directory: /lib/modules/custom
  Host: x86_64-unknown-linux-gnu
  GCC binary: gcc

Signed-off-by: Eric Leblond <eric@regit.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>