commit fc247bc667a8888a75f3b348edfaf212a8ad3575 Author: Toshaan Bharvani Date: Wed Aug 9 21:58:37 2023 +0200 initial package creation Signed-off-by: Toshaan Bharvani diff --git a/SOURCES/0001-doc-Add-deprecation-notices-to-all-relevant-man-page.patch b/SOURCES/0001-doc-Add-deprecation-notices-to-all-relevant-man-page.patch new file mode 100644 index 0000000..cdffca9 --- /dev/null +++ b/SOURCES/0001-doc-Add-deprecation-notices-to-all-relevant-man-page.patch @@ -0,0 +1,334 @@ +From 7ef75f20c338d0f09b50633aa0d5d83c868015ab Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Thu, 17 Jun 2021 18:44:28 +0200 +Subject: [PATCH] doc: Add deprecation notices to all relevant man pages + +This is RHEL9 trying to friendly kick people towards nftables. +--- + iptables/arptables-nft-restore.8 | 13 ++++++++++++- + iptables/arptables-nft-save.8 | 14 +++++++++++++- + iptables/arptables-nft.8 | 19 ++++++++++++++++++- + iptables/ebtables-nft.8 | 15 ++++++++++++++- + iptables/iptables-apply.8.in | 14 +++++++++++++- + iptables/iptables-extensions.8.tmpl.in | 14 ++++++++++++++ + iptables/iptables-restore.8.in | 17 ++++++++++++++++- + iptables/iptables-save.8.in | 15 ++++++++++++++- + iptables/iptables.8.in | 17 +++++++++++++++++ + iptables/xtables-monitor.8.in | 11 +++++++++++ + 10 files changed, 142 insertions(+), 7 deletions(-) + +diff --git a/iptables/arptables-nft-restore.8 b/iptables/arptables-nft-restore.8 +index 09d9082cf9fd3..b1bf02998f9cc 100644 +--- a/iptables/arptables-nft-restore.8 ++++ b/iptables/arptables-nft-restore.8 +@@ -24,6 +24,17 @@ arptables-restore \- Restore ARP Tables (nft-based) + .SH SYNOPSIS + \fBarptables\-restore + .SH DESCRIPTION ++This tool is ++.B deprecated ++in Red Hat Enterprise Linux. It is maintenance only and will not receive new ++features. New setups should use ++.BR nft (8). ++Existing setups should migrate to ++.BR nft (8) ++when possible. See ++.UR https://red.ht/nft_your_tables ++.UE ++for details. + .PP + .B arptables-restore + is used to restore ARP Tables from data specified on STDIN or +@@ -35,5 +46,5 @@ flushes (deletes) all previous contents of the respective ARP Table. + .SH AUTHOR + Jesper Dangaard Brouer + .SH SEE ALSO +-\fBarptables\-save\fP(8), \fBarptables\fP(8) ++\fBarptables\-save\fP(8), \fBarptables\fP(8), \fBnft\fP(8) + .PP +diff --git a/iptables/arptables-nft-save.8 b/iptables/arptables-nft-save.8 +index 905e59854cc28..49bb0f6260f2f 100644 +--- a/iptables/arptables-nft-save.8 ++++ b/iptables/arptables-nft-save.8 +@@ -27,6 +27,18 @@ arptables-save \- dump arptables rules to stdout (nft-based) + \fBarptables\-save\fP [\fB\-V\fP] + .SH DESCRIPTION + .PP ++This tool is ++.B deprecated ++in Red Hat Enterprise Linux. It is maintenance only and will not receive new ++features. New setups should use ++.BR nft (8). ++Existing setups should migrate to ++.BR nft (8) ++when possible. See ++.UR https://red.ht/nft_your_tables ++.UE ++for details. ++.PP + .B arptables-save + is used to dump the contents of an ARP Table in easily parseable format + to STDOUT. Use I/O-redirection provided by your shell to write to a file. +@@ -43,5 +55,5 @@ Print version information and exit. + .SH AUTHOR + Jesper Dangaard Brouer + .SH SEE ALSO +-\fBarptables\-restore\fP(8), \fBarptables\fP(8) ++\fBarptables\-restore\fP(8), \fBarptables\fP(8), \fBnft\fP(8) + .PP +diff --git a/iptables/arptables-nft.8 b/iptables/arptables-nft.8 +index ea31e0842acd4..ec5b993a41e8b 100644 +--- a/iptables/arptables-nft.8 ++++ b/iptables/arptables-nft.8 +@@ -39,6 +39,19 @@ arptables \- ARP table administration (nft-based) + .BR "arptables " [ "-t table" ] " -P chain target " [ options ] + + .SH DESCRIPTION ++.PP ++This tool is ++.B deprecated ++in Red Hat Enterprise Linux. It is maintenance only and will not receive new ++features. New setups should use ++.BR nft (8). ++Existing setups should migrate to ++.BR nft (8) ++when possible. See ++.UR https://red.ht/nft_your_tables ++.UE ++for details. ++.PP + .B arptables + is a user space tool, it is used to set up and maintain the + tables of ARP rules in the Linux kernel. These rules inspect +@@ -340,9 +353,13 @@ bridges, the same may be achieved using + chain in + .BR ebtables . + ++This tool is deprecated in Red Hat Enterprise Linux. It is maintenance only and ++will not receive new features. New setups should use \fBnft\fP(8). Existing ++setups should migrate to \fBnft\fP(8) when possible. ++ + .SH MAILINGLISTS + .BR "" "See " http://netfilter.org/mailinglists.html + .SH SEE ALSO +-.BR xtables-nft "(8), " iptables "(8), " ebtables "(8), " ip (8) ++.BR xtables-nft "(8), " iptables "(8), " ebtables "(8), " ip "(8), " nft (8) + .PP + .BR "" "See " https://wiki.nftables.org +diff --git a/iptables/ebtables-nft.8 b/iptables/ebtables-nft.8 +index d75aae240bc05..ed1bf8f2db55b 100644 +--- a/iptables/ebtables-nft.8 ++++ b/iptables/ebtables-nft.8 +@@ -46,6 +46,19 @@ ebtables \- Ethernet bridge frame table administration (nft-based) + .br + + .SH DESCRIPTION ++.PP ++This tool is ++.B deprecated ++in Red Hat Enterprise Linux. It is maintenance only and will not receive new ++features. New setups should use ++.BR nft (8). ++Existing setups should migrate to ++.BR nft (8) ++when possible. See ++.UR https://red.ht/nft_your_tables ++.UE ++for details. ++.PP + .B ebtables + is an application program used to set up and maintain the + tables of rules (inside the Linux kernel) that inspect +@@ -1069,6 +1082,6 @@ has not been implemented, although + might replace them entirely given the inherent atomicity of nftables. + Finally, this list is probably not complete. + .SH SEE ALSO +-.BR xtables-nft "(8), " iptables "(8), " ip (8) ++.BR xtables-nft "(8), " iptables "(8), " ip "(8), " nft (8) + .PP + .BR "" "See " https://wiki.nftables.org +diff --git a/iptables/iptables-apply.8.in b/iptables/iptables-apply.8.in +index f0ed4e5f8d450..7f99a21ed2b61 100644 +--- a/iptables/iptables-apply.8.in ++++ b/iptables/iptables-apply.8.in +@@ -11,6 +11,18 @@ iptables-apply \- a safer way to update iptables remotely + \fBiptables\-apply\fP [\-\fBhV\fP] [\fB-t\fP \fItimeout\fP] [\fB-w\fP \fIsavefile\fP] {[\fIrulesfile]|-c [runcmd]}\fP + .SH "DESCRIPTION" + .PP ++This tool is ++.B deprecated ++in Red Hat Enterprise Linux. It is maintenance only and will not receive new ++features. New setups should use ++.BR nft (8). ++Existing setups should migrate to ++.BR nft (8) ++when possible. See ++.UR https://red.ht/nft_your_tables ++.UE ++for details. ++.PP + iptables\-apply will try to apply a new rulesfile (as output by + iptables-save, read by iptables-restore) or run a command to configure + iptables and then prompt the user whether the changes are okay. If the +@@ -47,7 +59,7 @@ Display usage information. + Display version information. + .SH "SEE ALSO" + .PP +-\fBiptables-restore\fP(8), \fBiptables-save\fP(8), \fBiptables\fR(8). ++\fBiptables-restore\fP(8), \fBiptables-save\fP(8), \fBiptables\fR(8), \fBnft\fP(8). + .SH LEGALESE + .PP + Original iptables-apply - Copyright 2006 Martin F. Krafft . +diff --git a/iptables/iptables-extensions.8.tmpl.in b/iptables/iptables-extensions.8.tmpl.in +index 99d89a1fe44ad..73d40bbfe9c52 100644 +--- a/iptables/iptables-extensions.8.tmpl.in ++++ b/iptables/iptables-extensions.8.tmpl.in +@@ -7,6 +7,20 @@ iptables-extensions \(em list of extensions in the standard iptables distributio + .PP + \fBiptables\fP [\fB\-m\fP \fIname\fP [\fImodule-options\fP...]] + [\fB\-j\fP \fItarget-name\fP [\fItarget-options\fP...] ++.SH DESCRIPTION ++These tools are ++.B deprecated ++in Red Hat Enterprise Linux. They are maintenance only and will not receive new ++features. New setups should use ++.BR nft (8). ++Existing setups should migrate to ++.BR nft (8) ++when possible. See ++.UR https://red.ht/nft_your_tables ++.UE ++for details. There is also ++.BR iptables\-translate (8)/ ip6tables\-translate (8) ++to help with the migration. + .SH MATCH EXTENSIONS + iptables can use extended packet matching modules + with the \fB\-m\fP or \fB\-\-match\fP +diff --git a/iptables/iptables-restore.8.in b/iptables/iptables-restore.8.in +index 20216842d8358..8f4811c72f2ec 100644 +--- a/iptables/iptables-restore.8.in ++++ b/iptables/iptables-restore.8.in +@@ -31,6 +31,19 @@ ip6tables-restore \(em Restore IPv6 Tables + [\fB\-W\fP \fIusecs\fP] [\fB\-M\fP \fImodprobe\fP] [\fB\-T\fP \fIname\fP] + [\fBfile\fP] + .SH DESCRIPTION ++These tools are ++.B deprecated ++in Red Hat Enterprise Linux. They are maintenance only and will not receive new ++features. New setups should use ++.BR nft (8). ++Existing setups should migrate to ++.BR nft (8) ++when possible. See ++.UR https://red.ht/nft_your_tables ++.UE ++for details. There is also ++.BR iptables\-restore\-translate (8)/ ip6tables\-restore\-translate (8) ++to help with the migration. + .PP + .B iptables-restore + and +@@ -81,7 +94,9 @@ from Rusty Russell. + .br + Andras Kis-Szabo contributed ip6tables-restore. + .SH SEE ALSO +-\fBiptables\-apply\fP(8),\fBiptables\-save\fP(8), \fBiptables\fP(8) ++\fBiptables\-apply\fP(8), \fBiptables\-save\fP(8), \fBiptables\fP(8), ++\fBnft\fP(8), \fBiptables\-restore\-translate\fP(8), ++\fBip6tables\-restore\-translate\fP(8) + .PP + The iptables-HOWTO, which details more iptables usage, the NAT-HOWTO, + which details NAT, and the netfilter-hacking-HOWTO which details the +diff --git a/iptables/iptables-save.8.in b/iptables/iptables-save.8.in +index 7683fd3780f72..6fe50b2d446e5 100644 +--- a/iptables/iptables-save.8.in ++++ b/iptables/iptables-save.8.in +@@ -30,6 +30,18 @@ ip6tables-save \(em dump iptables rules + [\fB\-t\fP \fItable\fP] [\fB\-f\fP \fIfilename\fP] + .SH DESCRIPTION + .PP ++These tools are ++.B deprecated ++in Red Hat Enterprise Linux. They are maintenance only and will not receive new ++features. New setups should use ++.BR nft (8). ++Existing setups should migrate to ++.BR nft (8) ++when possible. See ++.UR https://red.ht/nft_your_tables ++.UE ++for details. ++.PP + .B iptables-save + and + .B ip6tables-save +@@ -62,7 +74,8 @@ Rusty Russell + .br + Andras Kis-Szabo contributed ip6tables-save. + .SH SEE ALSO +-\fBiptables\-apply\fP(8),\fBiptables\-restore\fP(8), \fBiptables\fP(8) ++\fBiptables\-apply\fP(8),\fBiptables\-restore\fP(8), \fBiptables\fP(8), ++\fBnft\fP(8) + .PP + The iptables-HOWTO, which details more iptables usage, the NAT-HOWTO, + which details NAT, and the netfilter-hacking-HOWTO which details the +diff --git a/iptables/iptables.8.in b/iptables/iptables.8.in +index 627ff0e4da7a4..a8b31206d45b2 100644 +--- a/iptables/iptables.8.in ++++ b/iptables/iptables.8.in +@@ -55,6 +55,20 @@ match = \fB\-m\fP \fImatchname\fP [\fIper-match-options\fP] + .PP + target = \fB\-j\fP \fItargetname\fP [\fIper\-target\-options\fP] + .SH DESCRIPTION ++These tools are ++.B deprecated ++in Red Hat Enterprise Linux. They are maintenance only and will not receive new ++features. New setups should use ++.BR nft (8). ++Existing setups should migrate to ++.BR nft (8) ++when possible. See ++.UR https://red.ht/nft_your_tables ++.UE ++for details. There is also ++.BR iptables\-translate (8)/ ip6tables\-translate (8) ++to help with the migration. ++.PP + \fBIptables\fP and \fBip6tables\fP are used to set up, maintain, and inspect the + tables of IPv4 and IPv6 packet + filter rules in the Linux kernel. Several different tables +@@ -447,6 +461,9 @@ There are several other changes in iptables. + \fBiptables\-save\fP(8), + \fBiptables\-restore\fP(8), + \fBiptables\-extensions\fP(8), ++\fBnft\fP(8), ++\fBiptables\-translate\fP(8), ++\fBip6tables\-translate\fP(8) + .PP + The packet-filtering-HOWTO details iptables usage for + packet filtering, the NAT-HOWTO details NAT, +diff --git a/iptables/xtables-monitor.8.in b/iptables/xtables-monitor.8.in +index a7f22c0d8c08e..e21d7ff23035f 100644 +--- a/iptables/xtables-monitor.8.in ++++ b/iptables/xtables-monitor.8.in +@@ -6,6 +6,17 @@ xtables-monitor \(em show changes to rule set and trace-events + .PP + \ + .SH DESCRIPTION ++This tool is ++.B deprecated ++in Red Hat Enterprise Linux. It is maintenance only and will not receive new ++features. New setups should use ++.BR nft (8). ++Existing setups should migrate to ++.BR nft (8) ++when possible. See ++.UR https://red.ht/nft_your_tables ++.UE ++for details. + .PP + .B xtables-monitor + is used to monitor changes to the ruleset or to show rule evaluation events +-- +2.34.1 + diff --git a/SOURCES/0002-extensions-SECMARK-Use-a-better-context-in-test-case.patch b/SOURCES/0002-extensions-SECMARK-Use-a-better-context-in-test-case.patch new file mode 100644 index 0000000..e432d7a --- /dev/null +++ b/SOURCES/0002-extensions-SECMARK-Use-a-better-context-in-test-case.patch @@ -0,0 +1,26 @@ +From 231626933e5fd54b8d9e66dfc9a8a374a9192121 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Fri, 16 Jul 2021 21:51:49 +0200 +Subject: [PATCH] extensions: SECMARK: Use a better context in test case + +RHEL SELinux policies don't allow setting +system_u:object_r:firewalld_exec_t:s0 context. Use one instead which has +'packet_type' attribute (identified via +'seinfo -xt | grep packet_type'). +--- + extensions/libxt_SECMARK.t | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/extensions/libxt_SECMARK.t b/extensions/libxt_SECMARK.t +index 39d4c09348bf4..295e7a7244902 100644 +--- a/extensions/libxt_SECMARK.t ++++ b/extensions/libxt_SECMARK.t +@@ -1,4 +1,4 @@ + :INPUT,FORWARD,OUTPUT + *security +--j SECMARK --selctx system_u:object_r:firewalld_exec_t:s0;=;OK ++-j SECMARK --selctx system_u:object_r:ssh_server_packet_t:s0;=;OK + -j SECMARK;;FAIL +-- +2.34.1 + diff --git a/SOURCES/0003-xshared-Fix-build-for-Werror-format-security.patch b/SOURCES/0003-xshared-Fix-build-for-Werror-format-security.patch new file mode 100644 index 0000000..182c174 --- /dev/null +++ b/SOURCES/0003-xshared-Fix-build-for-Werror-format-security.patch @@ -0,0 +1,29 @@ +From 4350a1e4daabc4ec1f9b692425d9bd0d48d27488 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Fri, 13 May 2022 16:51:58 +0200 +Subject: [PATCH] xshared: Fix build for -Werror=format-security + +Gcc complains about the omitted format string. + +Signed-off-by: Phil Sutter +(cherry picked from commit b72eb12ea5a61df0655ad99d5048994e916be83a) +--- + iptables/xshared.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/iptables/xshared.c b/iptables/xshared.c +index fae5ddd5df93e..a8512d3808154 100644 +--- a/iptables/xshared.c ++++ b/iptables/xshared.c +@@ -1307,7 +1307,7 @@ static void check_empty_interface(struct xtables_args *args, const char *arg) + return; + + if (args->family != NFPROTO_ARP) +- xtables_error(PARAMETER_PROBLEM, msg); ++ xtables_error(PARAMETER_PROBLEM, "%s", msg); + + fprintf(stderr, "%s", msg); + } +-- +2.34.1 + diff --git a/SOURCES/0004-tests-shell-Check-overhead-in-iptables-save-and-rest.patch b/SOURCES/0004-tests-shell-Check-overhead-in-iptables-save-and-rest.patch new file mode 100644 index 0000000..1994bff --- /dev/null +++ b/SOURCES/0004-tests-shell-Check-overhead-in-iptables-save-and-rest.patch @@ -0,0 +1,61 @@ +From e7a2e0f70ed69c7b1ed1b4e6474ccf0924f81b23 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Thu, 2 Jun 2022 13:44:45 +0200 +Subject: [PATCH] tests: shell: Check overhead in iptables-save and -restore + +Some repeated calls have been reduced recently, assert this in a test +evaluating strace output. + +Signed-off-by: Phil Sutter +(cherry picked from commit 0416ae5dea134b33e22c97e68b64010d679debe1) +--- + .../shell/testcases/ipt-save/0007-overhead_0 | 37 +++++++++++++++++++ + 1 file changed, 37 insertions(+) + create mode 100755 iptables/tests/shell/testcases/ipt-save/0007-overhead_0 + +diff --git a/iptables/tests/shell/testcases/ipt-save/0007-overhead_0 b/iptables/tests/shell/testcases/ipt-save/0007-overhead_0 +new file mode 100755 +index 0000000000000..b86d71f209471 +--- /dev/null ++++ b/iptables/tests/shell/testcases/ipt-save/0007-overhead_0 +@@ -0,0 +1,37 @@ ++#!/bin/bash ++ ++# Test recent performance improvements in iptables-save due to reduced ++# overhead. ++ ++strace --version >/dev/null || { echo "skip for missing strace"; exit 0; } ++ ++RULESET=$( ++ echo "*filter" ++ for ((i = 0; i < 100; i++)); do ++ echo ":mychain$i -" ++ echo "-A FORWARD -p tcp --dport 22 -j mychain$i" ++ done ++ echo "COMMIT" ++) ++ ++RESTORE_STRACE=$(strace $XT_MULTI iptables-restore <<< "$RULESET" 2>&1 >/dev/null) ++SAVE_STRACE=$(strace $XT_MULTI iptables-save 2>&1 >/dev/null) ++ ++do_grep() { # (name, threshold, pattern) ++ local cnt=$(grep -c "$3") ++ [[ $cnt -le $2 ]] && return 0 ++ echo "ERROR: Too many $3 lookups for $1: $cnt > $2" ++ exit 1 ++} ++ ++# iptables prefers hard-coded protocol names instead of looking them up first ++ ++do_grep "$XT_MULTI iptables-restore" 0 /etc/protocols <<< "$RESTORE_STRACE" ++do_grep "$XT_MULTI iptables-save" 0 /etc/protocols <<< "$SAVE_STRACE" ++ ++# iptables-nft-save pointlessly checked whether chain jumps are targets ++ ++do_grep "$XT_MULTI iptables-restore" 10 libxt_ <<< "$RESTORE_STRACE" ++do_grep "$XT_MULTI iptables-save" 10 libxt_ <<< "$SAVE_STRACE" ++ ++exit 0 +-- +2.34.1 + diff --git a/SOURCES/0005-arptables-Support-x-exact-flag.patch b/SOURCES/0005-arptables-Support-x-exact-flag.patch new file mode 100644 index 0000000..98c11b8 --- /dev/null +++ b/SOURCES/0005-arptables-Support-x-exact-flag.patch @@ -0,0 +1,33 @@ +From 5d197a9a4c0f456243894aea4b5fd059ecf6c402 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Tue, 7 Jun 2022 18:07:00 +0200 +Subject: [PATCH] arptables: Support -x/--exact flag + +Legacy arptables accepts but ignores the flag. Yet there are remains of +the functionality in sources, like OPT_EXPANDED define and a print_num() +function which acts on FMT_KILOMEGAGIGA flag being set or not. So +instead of mimicking legacy behaviour by explicitly ignoring -x flag for +arptables, just enable the feature for it. + +Signed-off-by: Phil Sutter +(cherry picked from commit 24c5b593156de29a49146bcc3497ebb7d8d40ef0) +--- + iptables/xshared.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/iptables/xshared.h b/iptables/xshared.h +index 14568bb00fb65..a50c8b7298072 100644 +--- a/iptables/xshared.h ++++ b/iptables/xshared.h +@@ -69,7 +69,7 @@ struct xtables_target; + + #define OPTSTRING_COMMON "-:A:C:D:E:F::I:L::M:N:P:VX::Z::" "c:d:i:j:o:p:s:t:" + #define IPT_OPTSTRING OPTSTRING_COMMON "R:S::W::" "46bfg:h::m:nvw::x" +-#define ARPT_OPTSTRING OPTSTRING_COMMON "R:S::" "h::l:nv" /* "m:" */ ++#define ARPT_OPTSTRING OPTSTRING_COMMON "R:S::" "h::l:nvx" /* "m:" */ + #define EBT_OPTSTRING OPTSTRING_COMMON "hv" + + /* define invflags which won't collide with IPT ones */ +-- +2.34.1 + diff --git a/SOURCES/0006-libxtables-Fix-unsupported-extension-warning-corner-.patch b/SOURCES/0006-libxtables-Fix-unsupported-extension-warning-corner-.patch new file mode 100644 index 0000000..f76f38d --- /dev/null +++ b/SOURCES/0006-libxtables-Fix-unsupported-extension-warning-corner-.patch @@ -0,0 +1,91 @@ +From 18fda96510a8e518e22523843050b824fa97cf2c Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Thu, 30 Jun 2022 18:04:39 +0200 +Subject: [PATCH] libxtables: Fix unsupported extension warning corner case + +Some extensions are not supported in revision 0 by user space anymore, +for those the warning in xtables_compatible_revision() does not print as +no revision 0 is tried. + +To fix this, one has to track if none of the user space supported +revisions were accepted by the kernel. Therefore add respective logic to +xtables_find_{target,match}(). + +Note that this does not lead to duplicated warnings for unsupported +extensions that have a revision 0 because xtables_compatible_revision() +returns true for them to allow for extension's help output. + +For the record, these ip6tables extensions are affected: set/SET, +socket, tos/TOS, TPROXY and SNAT. In addition to that, TEE is affected +for both families. + +Fixes: 17534cb18ed0a ("Improve error messages for unsupported extensions") +Signed-off-by: Phil Sutter +(cherry picked from commit 552c4a2f9e5706fef5f7abb27d1492a78bbb2a37) +--- + libxtables/xtables.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/libxtables/xtables.c b/libxtables/xtables.c +index 96fd783a066cf..7abc63bcfd83e 100644 +--- a/libxtables/xtables.c ++++ b/libxtables/xtables.c +@@ -773,6 +773,7 @@ xtables_find_match(const char *name, enum xtables_tryload tryload, + struct xtables_match *ptr; + const char *icmp6 = "icmp6"; + bool found = false; ++ bool seen = false; + + if (strlen(name) >= XT_EXTENSION_MAXNAMELEN) + xtables_error(PARAMETER_PROBLEM, +@@ -791,6 +792,7 @@ xtables_find_match(const char *name, enum xtables_tryload tryload, + if (extension_cmp(name, (*dptr)->name, (*dptr)->family)) { + ptr = *dptr; + *dptr = (*dptr)->next; ++ seen = true; + if (!found && + xtables_fully_register_pending_match(ptr, prev)) { + found = true; +@@ -804,6 +806,11 @@ xtables_find_match(const char *name, enum xtables_tryload tryload, + dptr = &((*dptr)->next); + } + ++ if (seen && !found) ++ fprintf(stderr, ++ "Warning: Extension %s is not supported, missing kernel module?\n", ++ name); ++ + for (ptr = xtables_matches; ptr; ptr = ptr->next) { + if (extension_cmp(name, ptr->name, ptr->family)) { + struct xtables_match *clone; +@@ -896,6 +903,7 @@ xtables_find_target(const char *name, enum xtables_tryload tryload) + struct xtables_target **dptr; + struct xtables_target *ptr; + bool found = false; ++ bool seen = false; + + /* Standard target? */ + if (strcmp(name, "") == 0 +@@ -914,6 +922,7 @@ xtables_find_target(const char *name, enum xtables_tryload tryload) + if (extension_cmp(name, (*dptr)->name, (*dptr)->family)) { + ptr = *dptr; + *dptr = (*dptr)->next; ++ seen = true; + if (!found && + xtables_fully_register_pending_target(ptr, prev)) { + found = true; +@@ -927,6 +936,11 @@ xtables_find_target(const char *name, enum xtables_tryload tryload) + dptr = &((*dptr)->next); + } + ++ if (seen && !found) ++ fprintf(stderr, ++ "Warning: Extension %s is not supported, missing kernel module?\n", ++ name); ++ + for (ptr = xtables_targets; ptr; ptr = ptr->next) { + if (extension_cmp(name, ptr->name, ptr->family)) { + struct xtables_target *clone; +-- +2.34.1 + diff --git a/SOURCES/0007-nft-fix-ebtables-among-match-when-mac-ip-addresses-a.patch b/SOURCES/0007-nft-fix-ebtables-among-match-when-mac-ip-addresses-a.patch new file mode 100644 index 0000000..d357e53 --- /dev/null +++ b/SOURCES/0007-nft-fix-ebtables-among-match-when-mac-ip-addresses-a.patch @@ -0,0 +1,36 @@ +From f24d2449693558d3fbf2a8313a7eb65ecf25f6af Mon Sep 17 00:00:00 2001 +From: Florian Westphal +Date: Tue, 2 Aug 2022 14:52:30 +0200 +Subject: [PATCH] nft: fix ebtables among match when mac+ip addresses are used + +When matching mac and ip addresses, the ip address needs to be placed +into then 2nd 32bit register, the switch to dynamic register allocation +instead re-uses reg1, this partially clobbers the mac address, so +set lookup comes up empty even though it should find a match. + +Fixes: 7e38890c6b4fb ("nft: prepare for dynamic register allocation") +Reported-by: Yi Chen +Signed-off-by: Florian Westphal +(cherry picked from commit 2ba74d421cd622757df7a93720afc3b5b4b3b4e0) +--- + iptables/nft.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/iptables/nft.c b/iptables/nft.c +index ec79f2bc5e98b..ee003511ab7f3 100644 +--- a/iptables/nft.c ++++ b/iptables/nft.c +@@ -1208,8 +1208,8 @@ static int __add_nft_among(struct nft_handle *h, const char *table, + nftnl_rule_add_expr(r, e); + + if (ip) { +- e = gen_payload(h, NFT_PAYLOAD_NETWORK_HEADER, ip_addr_off[dst], +- sizeof(struct in_addr), ®); ++ e = __gen_payload(NFT_PAYLOAD_NETWORK_HEADER, ip_addr_off[dst], ++ sizeof(struct in_addr), NFT_REG32_02); + if (!e) + return -ENOMEM; + nftnl_rule_add_expr(r, e); +-- +2.38.0 + diff --git a/SOURCES/0008-nft-un-break-among-match-with-concatenation.patch b/SOURCES/0008-nft-un-break-among-match-with-concatenation.patch new file mode 100644 index 0000000..021d17e --- /dev/null +++ b/SOURCES/0008-nft-un-break-among-match-with-concatenation.patch @@ -0,0 +1,958 @@ +From 22e12e53b1378f0e3da23ea298dda59985d5b99b Mon Sep 17 00:00:00 2001 +From: Florian Westphal +Date: Thu, 22 Sep 2022 13:33:50 +0200 +Subject: [PATCH] nft: un-break among match with concatenation + +The kernel commit 88cccd908d51 ("netfilter: nf_tables: NFTA_SET_ELEM_KEY_END requires concat and interval flags") +breaks ebtables-nft 'among' emulation, it sets NFTA_SET_ELEM_KEY_END but +doesn't set the CONCAT flag. + +Update uapi header and also set CONCAT. + +Signed-off-by: Florian Westphal +(cherry picked from commit 32efb4ffc33ae874b3f26f3380e2184ad6ceb26f) +--- + include/linux/netfilter/nf_tables.h | 483 +++++++++++++++++++++++++++- + iptables/nft.c | 2 +- + 2 files changed, 476 insertions(+), 9 deletions(-) + +diff --git a/include/linux/netfilter/nf_tables.h b/include/linux/netfilter/nf_tables.h +index 66dceee0ae307..e94d1fa554cb2 100644 +--- a/include/linux/netfilter/nf_tables.h ++++ b/include/linux/netfilter/nf_tables.h +@@ -8,6 +8,7 @@ + #define NFT_SET_MAXNAMELEN NFT_NAME_MAXLEN + #define NFT_OBJ_MAXNAMELEN NFT_NAME_MAXLEN + #define NFT_USERDATA_MAXLEN 256 ++#define NFT_OSF_MAXGENRELEN 16 + + /** + * enum nft_registers - nf_tables registers +@@ -47,6 +48,7 @@ enum nft_registers { + + #define NFT_REG_SIZE 16 + #define NFT_REG32_SIZE 4 ++#define NFT_REG32_COUNT (NFT_REG32_15 - NFT_REG32_00 + 1) + + /** + * enum nft_verdicts - nf_tables internal verdicts +@@ -131,7 +133,7 @@ enum nf_tables_msg_types { + * @NFTA_LIST_ELEM: list element (NLA_NESTED) + */ + enum nft_list_attributes { +- NFTA_LIST_UNPEC, ++ NFTA_LIST_UNSPEC, + NFTA_LIST_ELEM, + __NFTA_LIST_MAX + }; +@@ -143,12 +145,14 @@ enum nft_list_attributes { + * @NFTA_HOOK_HOOKNUM: netfilter hook number (NLA_U32) + * @NFTA_HOOK_PRIORITY: netfilter hook priority (NLA_U32) + * @NFTA_HOOK_DEV: netdevice name (NLA_STRING) ++ * @NFTA_HOOK_DEVS: list of netdevices (NLA_NESTED) + */ + enum nft_hook_attributes { + NFTA_HOOK_UNSPEC, + NFTA_HOOK_HOOKNUM, + NFTA_HOOK_PRIORITY, + NFTA_HOOK_DEV, ++ NFTA_HOOK_DEVS, + __NFTA_HOOK_MAX + }; + #define NFTA_HOOK_MAX (__NFTA_HOOK_MAX - 1) +@@ -160,7 +164,10 @@ enum nft_hook_attributes { + */ + enum nft_table_flags { + NFT_TABLE_F_DORMANT = 0x1, ++ NFT_TABLE_F_OWNER = 0x2, + }; ++#define NFT_TABLE_F_MASK (NFT_TABLE_F_DORMANT | \ ++ NFT_TABLE_F_OWNER) + + /** + * enum nft_table_attributes - nf_tables table netlink attributes +@@ -168,6 +175,8 @@ enum nft_table_flags { + * @NFTA_TABLE_NAME: name of the table (NLA_STRING) + * @NFTA_TABLE_FLAGS: bitmask of enum nft_table_flags (NLA_U32) + * @NFTA_TABLE_USE: number of chains in this table (NLA_U32) ++ * @NFTA_TABLE_USERDATA: user data (NLA_BINARY) ++ * @NFTA_TABLE_OWNER: owner of this table through netlink portID (NLA_U32) + */ + enum nft_table_attributes { + NFTA_TABLE_UNSPEC, +@@ -176,10 +185,21 @@ enum nft_table_attributes { + NFTA_TABLE_USE, + NFTA_TABLE_HANDLE, + NFTA_TABLE_PAD, ++ NFTA_TABLE_USERDATA, ++ NFTA_TABLE_OWNER, + __NFTA_TABLE_MAX + }; + #define NFTA_TABLE_MAX (__NFTA_TABLE_MAX - 1) + ++enum nft_chain_flags { ++ NFT_CHAIN_BASE = (1 << 0), ++ NFT_CHAIN_HW_OFFLOAD = (1 << 1), ++ NFT_CHAIN_BINDING = (1 << 2), ++}; ++#define NFT_CHAIN_FLAGS (NFT_CHAIN_BASE | \ ++ NFT_CHAIN_HW_OFFLOAD | \ ++ NFT_CHAIN_BINDING) ++ + /** + * enum nft_chain_attributes - nf_tables chain netlink attributes + * +@@ -191,6 +211,9 @@ enum nft_table_attributes { + * @NFTA_CHAIN_USE: number of references to this chain (NLA_U32) + * @NFTA_CHAIN_TYPE: type name of the string (NLA_NUL_STRING) + * @NFTA_CHAIN_COUNTERS: counter specification of the chain (NLA_NESTED: nft_counter_attributes) ++ * @NFTA_CHAIN_FLAGS: chain flags ++ * @NFTA_CHAIN_ID: uniquely identifies a chain in a transaction (NLA_U32) ++ * @NFTA_CHAIN_USERDATA: user data (NLA_BINARY) + */ + enum nft_chain_attributes { + NFTA_CHAIN_UNSPEC, +@@ -203,6 +226,9 @@ enum nft_chain_attributes { + NFTA_CHAIN_TYPE, + NFTA_CHAIN_COUNTERS, + NFTA_CHAIN_PAD, ++ NFTA_CHAIN_FLAGS, ++ NFTA_CHAIN_ID, ++ NFTA_CHAIN_USERDATA, + __NFTA_CHAIN_MAX + }; + #define NFTA_CHAIN_MAX (__NFTA_CHAIN_MAX - 1) +@@ -218,6 +244,7 @@ enum nft_chain_attributes { + * @NFTA_RULE_POSITION: numeric handle of the previous rule (NLA_U64) + * @NFTA_RULE_USERDATA: user data (NLA_BINARY, NFT_USERDATA_MAXLEN) + * @NFTA_RULE_ID: uniquely identifies a rule in a transaction (NLA_U32) ++ * @NFTA_RULE_POSITION_ID: transaction unique identifier of the previous rule (NLA_U32) + */ + enum nft_rule_attributes { + NFTA_RULE_UNSPEC, +@@ -230,6 +257,8 @@ enum nft_rule_attributes { + NFTA_RULE_USERDATA, + NFTA_RULE_PAD, + NFTA_RULE_ID, ++ NFTA_RULE_POSITION_ID, ++ NFTA_RULE_CHAIN_ID, + __NFTA_RULE_MAX + }; + #define NFTA_RULE_MAX (__NFTA_RULE_MAX - 1) +@@ -266,8 +295,10 @@ enum nft_rule_compat_attributes { + * @NFT_SET_INTERVAL: set contains intervals + * @NFT_SET_MAP: set is used as a dictionary + * @NFT_SET_TIMEOUT: set uses timeouts +- * @NFT_SET_EVAL: set contains expressions for evaluation ++ * @NFT_SET_EVAL: set can be updated from the evaluation path + * @NFT_SET_OBJECT: set contains stateful objects ++ * @NFT_SET_CONCAT: set contains a concatenation ++ * @NFT_SET_EXPR: set contains expressions + */ + enum nft_set_flags { + NFT_SET_ANONYMOUS = 0x1, +@@ -277,6 +308,8 @@ enum nft_set_flags { + NFT_SET_TIMEOUT = 0x10, + NFT_SET_EVAL = 0x20, + NFT_SET_OBJECT = 0x40, ++ NFT_SET_CONCAT = 0x80, ++ NFT_SET_EXPR = 0x100, + }; + + /** +@@ -294,14 +327,28 @@ enum nft_set_policies { + * enum nft_set_desc_attributes - set element description + * + * @NFTA_SET_DESC_SIZE: number of elements in set (NLA_U32) ++ * @NFTA_SET_DESC_CONCAT: description of field concatenation (NLA_NESTED) + */ + enum nft_set_desc_attributes { + NFTA_SET_DESC_UNSPEC, + NFTA_SET_DESC_SIZE, ++ NFTA_SET_DESC_CONCAT, + __NFTA_SET_DESC_MAX + }; + #define NFTA_SET_DESC_MAX (__NFTA_SET_DESC_MAX - 1) + ++/** ++ * enum nft_set_field_attributes - attributes of concatenated fields ++ * ++ * @NFTA_SET_FIELD_LEN: length of single field, in bits (NLA_U32) ++ */ ++enum nft_set_field_attributes { ++ NFTA_SET_FIELD_UNSPEC, ++ NFTA_SET_FIELD_LEN, ++ __NFTA_SET_FIELD_MAX ++}; ++#define NFTA_SET_FIELD_MAX (__NFTA_SET_FIELD_MAX - 1) ++ + /** + * enum nft_set_attributes - nf_tables set netlink attributes + * +@@ -320,6 +367,8 @@ enum nft_set_desc_attributes { + * @NFTA_SET_USERDATA: user data (NLA_BINARY) + * @NFTA_SET_OBJ_TYPE: stateful object type (NLA_U32: NFT_OBJECT_*) + * @NFTA_SET_HANDLE: set handle (NLA_U64) ++ * @NFTA_SET_EXPR: set expression (NLA_NESTED: nft_expr_attributes) ++ * @NFTA_SET_EXPRESSIONS: list of expressions (NLA_NESTED: nft_list_attributes) + */ + enum nft_set_attributes { + NFTA_SET_UNSPEC, +@@ -339,6 +388,8 @@ enum nft_set_attributes { + NFTA_SET_PAD, + NFTA_SET_OBJ_TYPE, + NFTA_SET_HANDLE, ++ NFTA_SET_EXPR, ++ NFTA_SET_EXPRESSIONS, + __NFTA_SET_MAX + }; + #define NFTA_SET_MAX (__NFTA_SET_MAX - 1) +@@ -347,9 +398,11 @@ enum nft_set_attributes { + * enum nft_set_elem_flags - nf_tables set element flags + * + * @NFT_SET_ELEM_INTERVAL_END: element ends the previous interval ++ * @NFT_SET_ELEM_CATCHALL: special catch-all element + */ + enum nft_set_elem_flags { + NFT_SET_ELEM_INTERVAL_END = 0x1, ++ NFT_SET_ELEM_CATCHALL = 0x2, + }; + + /** +@@ -363,6 +416,8 @@ enum nft_set_elem_flags { + * @NFTA_SET_ELEM_USERDATA: user data (NLA_BINARY) + * @NFTA_SET_ELEM_EXPR: expression (NLA_NESTED: nft_expr_attributes) + * @NFTA_SET_ELEM_OBJREF: stateful object reference (NLA_STRING) ++ * @NFTA_SET_ELEM_KEY_END: closing key value (NLA_NESTED: nft_data) ++ * @NFTA_SET_ELEM_EXPRESSIONS: list of expressions (NLA_NESTED: nft_list_attributes) + */ + enum nft_set_elem_attributes { + NFTA_SET_ELEM_UNSPEC, +@@ -375,6 +430,8 @@ enum nft_set_elem_attributes { + NFTA_SET_ELEM_EXPR, + NFTA_SET_ELEM_PAD, + NFTA_SET_ELEM_OBJREF, ++ NFTA_SET_ELEM_KEY_END, ++ NFTA_SET_ELEM_EXPRESSIONS, + __NFTA_SET_ELEM_MAX + }; + #define NFTA_SET_ELEM_MAX (__NFTA_SET_ELEM_MAX - 1) +@@ -440,11 +497,13 @@ enum nft_data_attributes { + * + * @NFTA_VERDICT_CODE: nf_tables verdict (NLA_U32: enum nft_verdicts) + * @NFTA_VERDICT_CHAIN: jump target chain name (NLA_STRING) ++ * @NFTA_VERDICT_CHAIN_ID: jump target chain ID (NLA_U32) + */ + enum nft_verdict_attributes { + NFTA_VERDICT_UNSPEC, + NFTA_VERDICT_CODE, + NFTA_VERDICT_CHAIN, ++ NFTA_VERDICT_CHAIN_ID, + __NFTA_VERDICT_MAX + }; + #define NFTA_VERDICT_MAX (__NFTA_VERDICT_MAX - 1) +@@ -477,6 +536,20 @@ enum nft_immediate_attributes { + }; + #define NFTA_IMMEDIATE_MAX (__NFTA_IMMEDIATE_MAX - 1) + ++/** ++ * enum nft_bitwise_ops - nf_tables bitwise operations ++ * ++ * @NFT_BITWISE_BOOL: mask-and-xor operation used to implement NOT, AND, OR and ++ * XOR boolean operations ++ * @NFT_BITWISE_LSHIFT: left-shift operation ++ * @NFT_BITWISE_RSHIFT: right-shift operation ++ */ ++enum nft_bitwise_ops { ++ NFT_BITWISE_BOOL, ++ NFT_BITWISE_LSHIFT, ++ NFT_BITWISE_RSHIFT, ++}; ++ + /** + * enum nft_bitwise_attributes - nf_tables bitwise expression netlink attributes + * +@@ -485,16 +558,20 @@ enum nft_immediate_attributes { + * @NFTA_BITWISE_LEN: length of operands (NLA_U32) + * @NFTA_BITWISE_MASK: mask value (NLA_NESTED: nft_data_attributes) + * @NFTA_BITWISE_XOR: xor value (NLA_NESTED: nft_data_attributes) ++ * @NFTA_BITWISE_OP: type of operation (NLA_U32: nft_bitwise_ops) ++ * @NFTA_BITWISE_DATA: argument for non-boolean operations ++ * (NLA_NESTED: nft_data_attributes) + * +- * The bitwise expression performs the following operation: ++ * The bitwise expression supports boolean and shift operations. It implements ++ * the boolean operations by performing the following operation: + * + * dreg = (sreg & mask) ^ xor + * +- * which allow to express all bitwise operations: ++ * with these mask and xor values: + * + * mask xor + * NOT: 1 1 +- * OR: 0 x ++ * OR: ~x x + * XOR: 1 x + * AND: x 0 + */ +@@ -505,6 +582,8 @@ enum nft_bitwise_attributes { + NFTA_BITWISE_LEN, + NFTA_BITWISE_MASK, + NFTA_BITWISE_XOR, ++ NFTA_BITWISE_OP, ++ NFTA_BITWISE_DATA, + __NFTA_BITWISE_MAX + }; + #define NFTA_BITWISE_MAX (__NFTA_BITWISE_MAX - 1) +@@ -631,10 +710,12 @@ enum nft_lookup_attributes { + enum nft_dynset_ops { + NFT_DYNSET_OP_ADD, + NFT_DYNSET_OP_UPDATE, ++ NFT_DYNSET_OP_DELETE, + }; + + enum nft_dynset_flags { + NFT_DYNSET_F_INV = (1 << 0), ++ NFT_DYNSET_F_EXPR = (1 << 1), + }; + + /** +@@ -648,6 +729,7 @@ enum nft_dynset_flags { + * @NFTA_DYNSET_TIMEOUT: timeout value for the new element (NLA_U64) + * @NFTA_DYNSET_EXPR: expression (NLA_NESTED: nft_expr_attributes) + * @NFTA_DYNSET_FLAGS: flags (NLA_U32) ++ * @NFTA_DYNSET_EXPRESSIONS: list of expressions (NLA_NESTED: nft_list_attributes) + */ + enum nft_dynset_attributes { + NFTA_DYNSET_UNSPEC, +@@ -660,6 +742,7 @@ enum nft_dynset_attributes { + NFTA_DYNSET_EXPR, + NFTA_DYNSET_PAD, + NFTA_DYNSET_FLAGS, ++ NFTA_DYNSET_EXPRESSIONS, + __NFTA_DYNSET_MAX, + }; + #define NFTA_DYNSET_MAX (__NFTA_DYNSET_MAX - 1) +@@ -682,10 +765,12 @@ enum nft_payload_bases { + * + * @NFT_PAYLOAD_CSUM_NONE: no checksumming + * @NFT_PAYLOAD_CSUM_INET: internet checksum (RFC 791) ++ * @NFT_PAYLOAD_CSUM_SCTP: CRC-32c, for use in SCTP header (RFC 3309) + */ + enum nft_payload_csum_types { + NFT_PAYLOAD_CSUM_NONE, + NFT_PAYLOAD_CSUM_INET, ++ NFT_PAYLOAD_CSUM_SCTP, + }; + + enum nft_payload_csum_flags { +@@ -727,10 +812,14 @@ enum nft_exthdr_flags { + * + * @NFT_EXTHDR_OP_IPV6: match against ipv6 extension headers + * @NFT_EXTHDR_OP_TCP: match against tcp options ++ * @NFT_EXTHDR_OP_IPV4: match against ipv4 options ++ * @NFT_EXTHDR_OP_SCTP: match against sctp chunks + */ + enum nft_exthdr_op { + NFT_EXTHDR_OP_IPV6, + NFT_EXTHDR_OP_TCPOPT, ++ NFT_EXTHDR_OP_IPV4, ++ NFT_EXTHDR_OP_SCTP, + __NFT_EXTHDR_OP_MAX + }; + #define NFT_EXTHDR_OP_MAX (__NFT_EXTHDR_OP_MAX - 1) +@@ -788,6 +877,15 @@ enum nft_exthdr_attributes { + * @NFT_META_CGROUP: socket control group (skb->sk->sk_classid) + * @NFT_META_PRANDOM: a 32bit pseudo-random number + * @NFT_META_SECPATH: boolean, secpath_exists (!!skb->sp) ++ * @NFT_META_IIFKIND: packet input interface kind name (dev->rtnl_link_ops->kind) ++ * @NFT_META_OIFKIND: packet output interface kind name (dev->rtnl_link_ops->kind) ++ * @NFT_META_BRI_IIFPVID: packet input bridge port pvid ++ * @NFT_META_BRI_IIFVPROTO: packet input bridge vlan proto ++ * @NFT_META_TIME_NS: time since epoch (in nanoseconds) ++ * @NFT_META_TIME_DAY: day of week (from 0 = Sunday to 6 = Saturday) ++ * @NFT_META_TIME_HOUR: hour of day (in seconds) ++ * @NFT_META_SDIF: slave device interface index ++ * @NFT_META_SDIFNAME: slave device interface name + */ + enum nft_meta_keys { + NFT_META_LEN, +@@ -816,6 +914,15 @@ enum nft_meta_keys { + NFT_META_CGROUP, + NFT_META_PRANDOM, + NFT_META_SECPATH, ++ NFT_META_IIFKIND, ++ NFT_META_OIFKIND, ++ NFT_META_BRI_IIFPVID, ++ NFT_META_BRI_IIFVPROTO, ++ NFT_META_TIME_NS, ++ NFT_META_TIME_DAY, ++ NFT_META_TIME_HOUR, ++ NFT_META_SDIF, ++ NFT_META_SDIFNAME, + }; + + /** +@@ -825,13 +932,17 @@ enum nft_meta_keys { + * @NFT_RT_NEXTHOP4: routing nexthop for IPv4 + * @NFT_RT_NEXTHOP6: routing nexthop for IPv6 + * @NFT_RT_TCPMSS: fetch current path tcp mss ++ * @NFT_RT_XFRM: boolean, skb->dst->xfrm != NULL + */ + enum nft_rt_keys { + NFT_RT_CLASSID, + NFT_RT_NEXTHOP4, + NFT_RT_NEXTHOP6, + NFT_RT_TCPMSS, ++ NFT_RT_XFRM, ++ __NFT_RT_MAX + }; ++#define NFT_RT_MAX (__NFT_RT_MAX - 1) + + /** + * enum nft_hash_types - nf_tables hash expression types +@@ -854,6 +965,8 @@ enum nft_hash_types { + * @NFTA_HASH_SEED: seed value (NLA_U32) + * @NFTA_HASH_OFFSET: add this offset value to hash result (NLA_U32) + * @NFTA_HASH_TYPE: hash operation (NLA_U32: nft_hash_types) ++ * @NFTA_HASH_SET_NAME: name of the map to lookup (NLA_STRING) ++ * @NFTA_HASH_SET_ID: id of the map (NLA_U32) + */ + enum nft_hash_attributes { + NFTA_HASH_UNSPEC, +@@ -864,6 +977,8 @@ enum nft_hash_attributes { + NFTA_HASH_SEED, + NFTA_HASH_OFFSET, + NFTA_HASH_TYPE, ++ NFTA_HASH_SET_NAME, /* deprecated */ ++ NFTA_HASH_SET_ID, /* deprecated */ + __NFTA_HASH_MAX, + }; + #define NFTA_HASH_MAX (__NFTA_HASH_MAX - 1) +@@ -898,6 +1013,39 @@ enum nft_rt_attributes { + }; + #define NFTA_RT_MAX (__NFTA_RT_MAX - 1) + ++/** ++ * enum nft_socket_attributes - nf_tables socket expression netlink attributes ++ * ++ * @NFTA_SOCKET_KEY: socket key to match ++ * @NFTA_SOCKET_DREG: destination register ++ * @NFTA_SOCKET_LEVEL: cgroups2 ancestor level (only for cgroupsv2) ++ */ ++enum nft_socket_attributes { ++ NFTA_SOCKET_UNSPEC, ++ NFTA_SOCKET_KEY, ++ NFTA_SOCKET_DREG, ++ NFTA_SOCKET_LEVEL, ++ __NFTA_SOCKET_MAX ++}; ++#define NFTA_SOCKET_MAX (__NFTA_SOCKET_MAX - 1) ++ ++/* ++ * enum nft_socket_keys - nf_tables socket expression keys ++ * ++ * @NFT_SOCKET_TRANSPARENT: Value of the IP(V6)_TRANSPARENT socket option ++ * @NFT_SOCKET_MARK: Value of the socket mark ++ * @NFT_SOCKET_WILDCARD: Whether the socket is zero-bound (e.g. 0.0.0.0 or ::0) ++ * @NFT_SOCKET_CGROUPV2: Match on cgroups version 2 ++ */ ++enum nft_socket_keys { ++ NFT_SOCKET_TRANSPARENT, ++ NFT_SOCKET_MARK, ++ NFT_SOCKET_WILDCARD, ++ NFT_SOCKET_CGROUPV2, ++ __NFT_SOCKET_MAX ++}; ++#define NFT_SOCKET_MAX (__NFT_SOCKET_MAX - 1) ++ + /** + * enum nft_ct_keys - nf_tables ct expression keys + * +@@ -909,8 +1057,8 @@ enum nft_rt_attributes { + * @NFT_CT_EXPIRATION: relative conntrack expiration time in ms + * @NFT_CT_HELPER: connection tracking helper assigned to conntrack + * @NFT_CT_L3PROTOCOL: conntrack layer 3 protocol +- * @NFT_CT_SRC: conntrack layer 3 protocol source (IPv4/IPv6 address) +- * @NFT_CT_DST: conntrack layer 3 protocol destination (IPv4/IPv6 address) ++ * @NFT_CT_SRC: conntrack layer 3 protocol source (IPv4/IPv6 address, deprecated) ++ * @NFT_CT_DST: conntrack layer 3 protocol destination (IPv4/IPv6 address, deprecated) + * @NFT_CT_PROTOCOL: conntrack layer 4 protocol + * @NFT_CT_PROTO_SRC: conntrack layer 4 protocol source + * @NFT_CT_PROTO_DST: conntrack layer 4 protocol destination +@@ -920,6 +1068,11 @@ enum nft_rt_attributes { + * @NFT_CT_AVGPKT: conntrack average bytes per packet + * @NFT_CT_ZONE: conntrack zone + * @NFT_CT_EVENTMASK: ctnetlink events to be generated for this conntrack ++ * @NFT_CT_SRC_IP: conntrack layer 3 protocol source (IPv4 address) ++ * @NFT_CT_DST_IP: conntrack layer 3 protocol destination (IPv4 address) ++ * @NFT_CT_SRC_IP6: conntrack layer 3 protocol source (IPv6 address) ++ * @NFT_CT_DST_IP6: conntrack layer 3 protocol destination (IPv6 address) ++ * @NFT_CT_ID: conntrack id + */ + enum nft_ct_keys { + NFT_CT_STATE, +@@ -941,7 +1094,14 @@ enum nft_ct_keys { + NFT_CT_AVGPKT, + NFT_CT_ZONE, + NFT_CT_EVENTMASK, ++ NFT_CT_SRC_IP, ++ NFT_CT_DST_IP, ++ NFT_CT_SRC_IP6, ++ NFT_CT_DST_IP6, ++ NFT_CT_ID, ++ __NFT_CT_MAX + }; ++#define NFT_CT_MAX (__NFT_CT_MAX - 1) + + /** + * enum nft_ct_attributes - nf_tables ct expression netlink attributes +@@ -1002,6 +1162,24 @@ enum nft_limit_attributes { + }; + #define NFTA_LIMIT_MAX (__NFTA_LIMIT_MAX - 1) + ++enum nft_connlimit_flags { ++ NFT_CONNLIMIT_F_INV = (1 << 0), ++}; ++ ++/** ++ * enum nft_connlimit_attributes - nf_tables connlimit expression netlink attributes ++ * ++ * @NFTA_CONNLIMIT_COUNT: number of connections (NLA_U32) ++ * @NFTA_CONNLIMIT_FLAGS: flags (NLA_U32: enum nft_connlimit_flags) ++ */ ++enum nft_connlimit_attributes { ++ NFTA_CONNLIMIT_UNSPEC, ++ NFTA_CONNLIMIT_COUNT, ++ NFTA_CONNLIMIT_FLAGS, ++ __NFTA_CONNLIMIT_MAX ++}; ++#define NFTA_CONNLIMIT_MAX (__NFTA_CONNLIMIT_MAX - 1) ++ + /** + * enum nft_counter_attributes - nf_tables counter expression netlink attributes + * +@@ -1017,6 +1195,21 @@ enum nft_counter_attributes { + }; + #define NFTA_COUNTER_MAX (__NFTA_COUNTER_MAX - 1) + ++/** ++ * enum nft_last_attributes - nf_tables last expression netlink attributes ++ * ++ * @NFTA_LAST_SET: last update has been set, zero means never updated (NLA_U32) ++ * @NFTA_LAST_MSECS: milliseconds since last update (NLA_U64) ++ */ ++enum nft_last_attributes { ++ NFTA_LAST_UNSPEC, ++ NFTA_LAST_SET, ++ NFTA_LAST_MSECS, ++ NFTA_LAST_PAD, ++ __NFTA_LAST_MAX ++}; ++#define NFTA_LAST_MAX (__NFTA_LAST_MAX - 1) ++ + /** + * enum nft_log_attributes - nf_tables log expression netlink attributes + * +@@ -1039,6 +1232,33 @@ enum nft_log_attributes { + }; + #define NFTA_LOG_MAX (__NFTA_LOG_MAX - 1) + ++/** ++ * enum nft_log_level - nf_tables log levels ++ * ++ * @NFT_LOGLEVEL_EMERG: system is unusable ++ * @NFT_LOGLEVEL_ALERT: action must be taken immediately ++ * @NFT_LOGLEVEL_CRIT: critical conditions ++ * @NFT_LOGLEVEL_ERR: error conditions ++ * @NFT_LOGLEVEL_WARNING: warning conditions ++ * @NFT_LOGLEVEL_NOTICE: normal but significant condition ++ * @NFT_LOGLEVEL_INFO: informational ++ * @NFT_LOGLEVEL_DEBUG: debug-level messages ++ * @NFT_LOGLEVEL_AUDIT: enabling audit logging ++ */ ++enum nft_log_level { ++ NFT_LOGLEVEL_EMERG, ++ NFT_LOGLEVEL_ALERT, ++ NFT_LOGLEVEL_CRIT, ++ NFT_LOGLEVEL_ERR, ++ NFT_LOGLEVEL_WARNING, ++ NFT_LOGLEVEL_NOTICE, ++ NFT_LOGLEVEL_INFO, ++ NFT_LOGLEVEL_DEBUG, ++ NFT_LOGLEVEL_AUDIT, ++ __NFT_LOGLEVEL_MAX ++}; ++#define NFT_LOGLEVEL_MAX (__NFT_LOGLEVEL_MAX - 1) ++ + /** + * enum nft_queue_attributes - nf_tables queue expression netlink attributes + * +@@ -1083,6 +1303,21 @@ enum nft_quota_attributes { + }; + #define NFTA_QUOTA_MAX (__NFTA_QUOTA_MAX - 1) + ++/** ++ * enum nft_secmark_attributes - nf_tables secmark object netlink attributes ++ * ++ * @NFTA_SECMARK_CTX: security context (NLA_STRING) ++ */ ++enum nft_secmark_attributes { ++ NFTA_SECMARK_UNSPEC, ++ NFTA_SECMARK_CTX, ++ __NFTA_SECMARK_MAX, ++}; ++#define NFTA_SECMARK_MAX (__NFTA_SECMARK_MAX - 1) ++ ++/* Max security context length */ ++#define NFT_SECMARK_CTX_MAXLEN 256 ++ + /** + * enum nft_reject_types - nf_tables reject expression reject types + * +@@ -1164,6 +1399,22 @@ enum nft_nat_attributes { + }; + #define NFTA_NAT_MAX (__NFTA_NAT_MAX - 1) + ++/** ++ * enum nft_tproxy_attributes - nf_tables tproxy expression netlink attributes ++ * ++ * NFTA_TPROXY_FAMILY: Target address family (NLA_U32: nft_registers) ++ * NFTA_TPROXY_REG_ADDR: Target address register (NLA_U32: nft_registers) ++ * NFTA_TPROXY_REG_PORT: Target port register (NLA_U32: nft_registers) ++ */ ++enum nft_tproxy_attributes { ++ NFTA_TPROXY_UNSPEC, ++ NFTA_TPROXY_FAMILY, ++ NFTA_TPROXY_REG_ADDR, ++ NFTA_TPROXY_REG_PORT, ++ __NFTA_TPROXY_MAX ++}; ++#define NFTA_TPROXY_MAX (__NFTA_TPROXY_MAX - 1) ++ + /** + * enum nft_masq_attributes - nf_tables masquerade expression attributes + * +@@ -1214,10 +1465,14 @@ enum nft_dup_attributes { + * enum nft_fwd_attributes - nf_tables fwd expression netlink attributes + * + * @NFTA_FWD_SREG_DEV: source register of output interface (NLA_U32: nft_register) ++ * @NFTA_FWD_SREG_ADDR: source register of destination address (NLA_U32: nft_register) ++ * @NFTA_FWD_NFPROTO: layer 3 family of source register address (NLA_U32: enum nfproto) + */ + enum nft_fwd_attributes { + NFTA_FWD_UNSPEC, + NFTA_FWD_SREG_DEV, ++ NFTA_FWD_SREG_ADDR, ++ NFTA_FWD_NFPROTO, + __NFTA_FWD_MAX + }; + #define NFTA_FWD_MAX (__NFTA_FWD_MAX - 1) +@@ -1302,12 +1557,38 @@ enum nft_ct_helper_attributes { + }; + #define NFTA_CT_HELPER_MAX (__NFTA_CT_HELPER_MAX - 1) + ++enum nft_ct_timeout_timeout_attributes { ++ NFTA_CT_TIMEOUT_UNSPEC, ++ NFTA_CT_TIMEOUT_L3PROTO, ++ NFTA_CT_TIMEOUT_L4PROTO, ++ NFTA_CT_TIMEOUT_DATA, ++ __NFTA_CT_TIMEOUT_MAX, ++}; ++#define NFTA_CT_TIMEOUT_MAX (__NFTA_CT_TIMEOUT_MAX - 1) ++ ++enum nft_ct_expectation_attributes { ++ NFTA_CT_EXPECT_UNSPEC, ++ NFTA_CT_EXPECT_L3PROTO, ++ NFTA_CT_EXPECT_L4PROTO, ++ NFTA_CT_EXPECT_DPORT, ++ NFTA_CT_EXPECT_TIMEOUT, ++ NFTA_CT_EXPECT_SIZE, ++ __NFTA_CT_EXPECT_MAX, ++}; ++#define NFTA_CT_EXPECT_MAX (__NFTA_CT_EXPECT_MAX - 1) ++ + #define NFT_OBJECT_UNSPEC 0 + #define NFT_OBJECT_COUNTER 1 + #define NFT_OBJECT_QUOTA 2 + #define NFT_OBJECT_CT_HELPER 3 + #define NFT_OBJECT_LIMIT 4 +-#define __NFT_OBJECT_MAX 5 ++#define NFT_OBJECT_CONNLIMIT 5 ++#define NFT_OBJECT_TUNNEL 6 ++#define NFT_OBJECT_CT_TIMEOUT 7 ++#define NFT_OBJECT_SECMARK 8 ++#define NFT_OBJECT_CT_EXPECT 9 ++#define NFT_OBJECT_SYNPROXY 10 ++#define __NFT_OBJECT_MAX 11 + #define NFT_OBJECT_MAX (__NFT_OBJECT_MAX - 1) + + /** +@@ -1319,6 +1600,7 @@ enum nft_ct_helper_attributes { + * @NFTA_OBJ_DATA: stateful object data (NLA_NESTED) + * @NFTA_OBJ_USE: number of references to this expression (NLA_U32) + * @NFTA_OBJ_HANDLE: object handle (NLA_U64) ++ * @NFTA_OBJ_USERDATA: user data (NLA_BINARY) + */ + enum nft_object_attributes { + NFTA_OBJ_UNSPEC, +@@ -1329,10 +1611,24 @@ enum nft_object_attributes { + NFTA_OBJ_USE, + NFTA_OBJ_HANDLE, + NFTA_OBJ_PAD, ++ NFTA_OBJ_USERDATA, + __NFTA_OBJ_MAX + }; + #define NFTA_OBJ_MAX (__NFTA_OBJ_MAX - 1) + ++/** ++ * enum nft_flowtable_flags - nf_tables flowtable flags ++ * ++ * @NFT_FLOWTABLE_HW_OFFLOAD: flowtable hardware offload is enabled ++ * @NFT_FLOWTABLE_COUNTER: enable flow counters ++ */ ++enum nft_flowtable_flags { ++ NFT_FLOWTABLE_HW_OFFLOAD = 0x1, ++ NFT_FLOWTABLE_COUNTER = 0x2, ++ NFT_FLOWTABLE_MASK = (NFT_FLOWTABLE_HW_OFFLOAD | ++ NFT_FLOWTABLE_COUNTER) ++}; ++ + /** + * enum nft_flowtable_attributes - nf_tables flow table netlink attributes + * +@@ -1341,6 +1637,7 @@ enum nft_object_attributes { + * @NFTA_FLOWTABLE_HOOK: netfilter hook configuration(NLA_U32) + * @NFTA_FLOWTABLE_USE: number of references to this flow table (NLA_U32) + * @NFTA_FLOWTABLE_HANDLE: object handle (NLA_U64) ++ * @NFTA_FLOWTABLE_FLAGS: flags (NLA_U32) + */ + enum nft_flowtable_attributes { + NFTA_FLOWTABLE_UNSPEC, +@@ -1350,6 +1647,7 @@ enum nft_flowtable_attributes { + NFTA_FLOWTABLE_USE, + NFTA_FLOWTABLE_HANDLE, + NFTA_FLOWTABLE_PAD, ++ NFTA_FLOWTABLE_FLAGS, + __NFTA_FLOWTABLE_MAX + }; + #define NFTA_FLOWTABLE_MAX (__NFTA_FLOWTABLE_MAX - 1) +@@ -1370,6 +1668,42 @@ enum nft_flowtable_hook_attributes { + }; + #define NFTA_FLOWTABLE_HOOK_MAX (__NFTA_FLOWTABLE_HOOK_MAX - 1) + ++/** ++ * enum nft_osf_attributes - nftables osf expression netlink attributes ++ * ++ * @NFTA_OSF_DREG: destination register (NLA_U32: nft_registers) ++ * @NFTA_OSF_TTL: Value of the TTL osf option (NLA_U8) ++ * @NFTA_OSF_FLAGS: flags (NLA_U32) ++ */ ++enum nft_osf_attributes { ++ NFTA_OSF_UNSPEC, ++ NFTA_OSF_DREG, ++ NFTA_OSF_TTL, ++ NFTA_OSF_FLAGS, ++ __NFTA_OSF_MAX, ++}; ++#define NFTA_OSF_MAX (__NFTA_OSF_MAX - 1) ++ ++enum nft_osf_flags { ++ NFT_OSF_F_VERSION = (1 << 0), ++}; ++ ++/** ++ * enum nft_synproxy_attributes - nf_tables synproxy expression netlink attributes ++ * ++ * @NFTA_SYNPROXY_MSS: mss value sent to the backend (NLA_U16) ++ * @NFTA_SYNPROXY_WSCALE: wscale value sent to the backend (NLA_U8) ++ * @NFTA_SYNPROXY_FLAGS: flags (NLA_U32) ++ */ ++enum nft_synproxy_attributes { ++ NFTA_SYNPROXY_UNSPEC, ++ NFTA_SYNPROXY_MSS, ++ NFTA_SYNPROXY_WSCALE, ++ NFTA_SYNPROXY_FLAGS, ++ __NFTA_SYNPROXY_MAX, ++}; ++#define NFTA_SYNPROXY_MAX (__NFTA_SYNPROXY_MAX - 1) ++ + /** + * enum nft_device_attributes - nf_tables device netlink attributes + * +@@ -1382,6 +1716,35 @@ enum nft_devices_attributes { + }; + #define NFTA_DEVICE_MAX (__NFTA_DEVICE_MAX - 1) + ++/* ++ * enum nft_xfrm_attributes - nf_tables xfrm expr netlink attributes ++ * ++ * @NFTA_XFRM_DREG: destination register (NLA_U32) ++ * @NFTA_XFRM_KEY: enum nft_xfrm_keys (NLA_U32) ++ * @NFTA_XFRM_DIR: direction (NLA_U8) ++ * @NFTA_XFRM_SPNUM: index in secpath array (NLA_U32) ++ */ ++enum nft_xfrm_attributes { ++ NFTA_XFRM_UNSPEC, ++ NFTA_XFRM_DREG, ++ NFTA_XFRM_KEY, ++ NFTA_XFRM_DIR, ++ NFTA_XFRM_SPNUM, ++ __NFTA_XFRM_MAX ++}; ++#define NFTA_XFRM_MAX (__NFTA_XFRM_MAX - 1) ++ ++enum nft_xfrm_keys { ++ NFT_XFRM_KEY_UNSPEC, ++ NFT_XFRM_KEY_DADDR_IP4, ++ NFT_XFRM_KEY_DADDR_IP6, ++ NFT_XFRM_KEY_SADDR_IP4, ++ NFT_XFRM_KEY_SADDR_IP6, ++ NFT_XFRM_KEY_REQID, ++ NFT_XFRM_KEY_SPI, ++ __NFT_XFRM_KEY_MAX, ++}; ++#define NFT_XFRM_KEY_MAX (__NFT_XFRM_KEY_MAX - 1) + + /** + * enum nft_trace_attributes - nf_tables trace netlink attributes +@@ -1442,6 +1805,8 @@ enum nft_trace_types { + * @NFTA_NG_MODULUS: maximum counter value (NLA_U32) + * @NFTA_NG_TYPE: operation type (NLA_U32) + * @NFTA_NG_OFFSET: offset to be added to the counter (NLA_U32) ++ * @NFTA_NG_SET_NAME: name of the map to lookup (NLA_STRING) ++ * @NFTA_NG_SET_ID: id of the map (NLA_U32) + */ + enum nft_ng_attributes { + NFTA_NG_UNSPEC, +@@ -1449,6 +1814,8 @@ enum nft_ng_attributes { + NFTA_NG_MODULUS, + NFTA_NG_TYPE, + NFTA_NG_OFFSET, ++ NFTA_NG_SET_NAME, /* deprecated */ ++ NFTA_NG_SET_ID, /* deprecated */ + __NFTA_NG_MAX + }; + #define NFTA_NG_MAX (__NFTA_NG_MAX - 1) +@@ -1460,4 +1827,104 @@ enum nft_ng_types { + }; + #define NFT_NG_MAX (__NFT_NG_MAX - 1) + ++enum nft_tunnel_key_ip_attributes { ++ NFTA_TUNNEL_KEY_IP_UNSPEC, ++ NFTA_TUNNEL_KEY_IP_SRC, ++ NFTA_TUNNEL_KEY_IP_DST, ++ __NFTA_TUNNEL_KEY_IP_MAX ++}; ++#define NFTA_TUNNEL_KEY_IP_MAX (__NFTA_TUNNEL_KEY_IP_MAX - 1) ++ ++enum nft_tunnel_ip6_attributes { ++ NFTA_TUNNEL_KEY_IP6_UNSPEC, ++ NFTA_TUNNEL_KEY_IP6_SRC, ++ NFTA_TUNNEL_KEY_IP6_DST, ++ NFTA_TUNNEL_KEY_IP6_FLOWLABEL, ++ __NFTA_TUNNEL_KEY_IP6_MAX ++}; ++#define NFTA_TUNNEL_KEY_IP6_MAX (__NFTA_TUNNEL_KEY_IP6_MAX - 1) ++ ++enum nft_tunnel_opts_attributes { ++ NFTA_TUNNEL_KEY_OPTS_UNSPEC, ++ NFTA_TUNNEL_KEY_OPTS_VXLAN, ++ NFTA_TUNNEL_KEY_OPTS_ERSPAN, ++ NFTA_TUNNEL_KEY_OPTS_GENEVE, ++ __NFTA_TUNNEL_KEY_OPTS_MAX ++}; ++#define NFTA_TUNNEL_KEY_OPTS_MAX (__NFTA_TUNNEL_KEY_OPTS_MAX - 1) ++ ++enum nft_tunnel_opts_vxlan_attributes { ++ NFTA_TUNNEL_KEY_VXLAN_UNSPEC, ++ NFTA_TUNNEL_KEY_VXLAN_GBP, ++ __NFTA_TUNNEL_KEY_VXLAN_MAX ++}; ++#define NFTA_TUNNEL_KEY_VXLAN_MAX (__NFTA_TUNNEL_KEY_VXLAN_MAX - 1) ++ ++enum nft_tunnel_opts_erspan_attributes { ++ NFTA_TUNNEL_KEY_ERSPAN_UNSPEC, ++ NFTA_TUNNEL_KEY_ERSPAN_VERSION, ++ NFTA_TUNNEL_KEY_ERSPAN_V1_INDEX, ++ NFTA_TUNNEL_KEY_ERSPAN_V2_HWID, ++ NFTA_TUNNEL_KEY_ERSPAN_V2_DIR, ++ __NFTA_TUNNEL_KEY_ERSPAN_MAX ++}; ++#define NFTA_TUNNEL_KEY_ERSPAN_MAX (__NFTA_TUNNEL_KEY_ERSPAN_MAX - 1) ++ ++enum nft_tunnel_opts_geneve_attributes { ++ NFTA_TUNNEL_KEY_GENEVE_UNSPEC, ++ NFTA_TUNNEL_KEY_GENEVE_CLASS, ++ NFTA_TUNNEL_KEY_GENEVE_TYPE, ++ NFTA_TUNNEL_KEY_GENEVE_DATA, ++ __NFTA_TUNNEL_KEY_GENEVE_MAX ++}; ++#define NFTA_TUNNEL_KEY_GENEVE_MAX (__NFTA_TUNNEL_KEY_GENEVE_MAX - 1) ++ ++enum nft_tunnel_flags { ++ NFT_TUNNEL_F_ZERO_CSUM_TX = (1 << 0), ++ NFT_TUNNEL_F_DONT_FRAGMENT = (1 << 1), ++ NFT_TUNNEL_F_SEQ_NUMBER = (1 << 2), ++}; ++#define NFT_TUNNEL_F_MASK (NFT_TUNNEL_F_ZERO_CSUM_TX | \ ++ NFT_TUNNEL_F_DONT_FRAGMENT | \ ++ NFT_TUNNEL_F_SEQ_NUMBER) ++ ++enum nft_tunnel_key_attributes { ++ NFTA_TUNNEL_KEY_UNSPEC, ++ NFTA_TUNNEL_KEY_ID, ++ NFTA_TUNNEL_KEY_IP, ++ NFTA_TUNNEL_KEY_IP6, ++ NFTA_TUNNEL_KEY_FLAGS, ++ NFTA_TUNNEL_KEY_TOS, ++ NFTA_TUNNEL_KEY_TTL, ++ NFTA_TUNNEL_KEY_SPORT, ++ NFTA_TUNNEL_KEY_DPORT, ++ NFTA_TUNNEL_KEY_OPTS, ++ __NFTA_TUNNEL_KEY_MAX ++}; ++#define NFTA_TUNNEL_KEY_MAX (__NFTA_TUNNEL_KEY_MAX - 1) ++ ++enum nft_tunnel_keys { ++ NFT_TUNNEL_PATH, ++ NFT_TUNNEL_ID, ++ __NFT_TUNNEL_MAX ++}; ++#define NFT_TUNNEL_MAX (__NFT_TUNNEL_MAX - 1) ++ ++enum nft_tunnel_mode { ++ NFT_TUNNEL_MODE_NONE, ++ NFT_TUNNEL_MODE_RX, ++ NFT_TUNNEL_MODE_TX, ++ __NFT_TUNNEL_MODE_MAX ++}; ++#define NFT_TUNNEL_MODE_MAX (__NFT_TUNNEL_MODE_MAX - 1) ++ ++enum nft_tunnel_attributes { ++ NFTA_TUNNEL_UNSPEC, ++ NFTA_TUNNEL_KEY, ++ NFTA_TUNNEL_DREG, ++ NFTA_TUNNEL_MODE, ++ __NFTA_TUNNEL_MAX ++}; ++#define NFTA_TUNNEL_MAX (__NFTA_TUNNEL_MAX - 1) ++ + #endif /* _LINUX_NF_TABLES_H */ +diff --git a/iptables/nft.c b/iptables/nft.c +index ee003511ab7f3..4807090cc4306 100644 +--- a/iptables/nft.c ++++ b/iptables/nft.c +@@ -1167,7 +1167,7 @@ static int __add_nft_among(struct nft_handle *h, const char *table, + type = type << CONCAT_TYPE_BITS | NFT_DATATYPE_IPADDR; + len += sizeof(struct in_addr) + NETLINK_ALIGN - 1; + len &= ~(NETLINK_ALIGN - 1); +- flags = NFT_SET_INTERVAL; ++ flags = NFT_SET_INTERVAL | NFT_SET_CONCAT; + } + + s = add_anon_set(h, table, flags, type, len, cnt); +-- +2.38.0 + diff --git a/SOURCES/arptables-nft-helper b/SOURCES/arptables-nft-helper new file mode 100644 index 0000000..913298d --- /dev/null +++ b/SOURCES/arptables-nft-helper @@ -0,0 +1,73 @@ +#!/bin/sh + +ARPTABLES_CONFIG=/etc/sysconfig/arptables + +# compat for removed initscripts dependency + +success() { + echo "[ OK ]" + return 0 +} + +failure() { + echo "[FAILED]" + return 1 +} + +start() { + if [ ! -x /usr/sbin/arptables ]; then + exit 4 + fi + + # don't do squat if we don't have the config file + if [ -f $ARPTABLES_CONFIG ]; then + printf "Applying arptables firewall rules: " + /usr/sbin/arptables-restore < $ARPTABLES_CONFIG && \ + success || \ + failure + touch /var/lock/subsys/arptables + else + failure + echo "Configuration file /etc/sysconfig/arptables missing" + exit 6 + fi +} + +stop() { + printf "Removing user defined chains: " + arptables -X && success || failure + printf "Flushing all chains: " + arptables -F && success || failure + printf "Resetting built-in chains to the default ACCEPT policy: " + arptables -P INPUT ACCEPT && \ + arptables -P OUTPUT ACCEPT && \ + success || \ + failure + rm -f /var/lock/subsys/arptables +} + +case "$1" in +start) + start + ;; + +stop) + stop + ;; + +restart|reload) + # "restart" is really just "start" as this isn't a daemon, + # and "start" clears any pre-defined rules anyway. + # This is really only here to make those who expect it happy + start + ;; + +condrestart|try-restart|force-reload) + [ -e /var/lock/subsys/arptables ] && start + ;; + +*) + exit 2 +esac + +exit 0 diff --git a/SOURCES/arptables.service b/SOURCES/arptables.service new file mode 100644 index 0000000..df6c7d6 --- /dev/null +++ b/SOURCES/arptables.service @@ -0,0 +1,12 @@ +[Unit] +Description=Automates a packet filtering firewall with arptables +After=network.target + +[Service] +Type=oneshot +ExecStart=/usr/libexec/arptables-helper start +ExecStop=/usr/libexec/arptables-helper stop +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/SOURCES/ebtables-config b/SOURCES/ebtables-config new file mode 100644 index 0000000..69d9289 --- /dev/null +++ b/SOURCES/ebtables-config @@ -0,0 +1,11 @@ +# Save current firewall rules on stop. +# Value: yes|no, default: no +# Saves all firewall rules if firewall gets stopped +# (e.g. on system shutdown). +EBTABLES_SAVE_ON_STOP="no" + +# Save (and restore) rule counters. +# Value: yes|no, default: no +# Save rule counters when saving a kernel table to a file. If the +# rule counters were saved, they will be restored when restoring the table. +EBTABLES_SAVE_COUNTER="no" diff --git a/SOURCES/ebtables-helper b/SOURCES/ebtables-helper new file mode 100644 index 0000000..4773a73 --- /dev/null +++ b/SOURCES/ebtables-helper @@ -0,0 +1,104 @@ +#!/bin/bash + +# compat for removed initscripts dependency + +success() { + echo "[ OK ]" + return 0 +} + +failure() { + echo "[FAILED]" + return 1 +} + +# internal variables +EBTABLES_CONFIG=/etc/sysconfig/ebtables-config +EBTABLES_DATA=/etc/sysconfig/ebtables +EBTABLES_TABLES="filter nat" +if ebtables --version | grep -q '(legacy)'; then + EBTABLES_TABLES+=" broute" +fi +VAR_SUBSYS_EBTABLES=/var/lock/subsys/ebtables + +# ebtables-config defaults +EBTABLES_SAVE_ON_STOP="no" +EBTABLES_SAVE_COUNTER="no" + +# load config if existing +[ -f "$EBTABLES_CONFIG" ] && . "$EBTABLES_CONFIG" + +initialize() { + local ret=0 + for table in $EBTABLES_TABLES; do + ebtables -t $table --init-table || ret=1 + done + return $ret +} + +sanitize_dump() { + local drop=false + + export EBTABLES_TABLES + + cat $1 | while read line; do + case $line in + \**) + drop=false + local table="${line#\*}" + local found=false + for t in $EBTABLES_TABLES; do + if [[ $t == "$table" ]]; then + found=true + break + fi + done + $found || drop=true + ;; + esac + $drop || echo "$line" + done +} + +start() { + if [ -f $EBTABLES_DATA ]; then + echo -n $"ebtables: loading ruleset from $EBTABLES_DATA: " + sanitize_dump $EBTABLES_DATA | ebtables-restore + else + echo -n $"ebtables: no stored ruleset, initializing empty tables: " + initialize + fi + local ret=$? + touch $VAR_SUBSYS_EBTABLES + return $ret +} + +save() { + echo -n $"ebtables: saving active ruleset to $EBTABLES_DATA: " + export EBTABLES_SAVE_COUNTER + ebtables-save >$EBTABLES_DATA && success || failure +} + +case $1 in + start) + [ -f "$VAR_SUBSYS_EBTABLES" ] && exit 0 + start && success || failure + RETVAL=$? + ;; + stop) + [ "x$EBTABLES_SAVE_ON_STOP" = "xyes" ] && save + echo -n $"ebtables: stopping firewall: " + initialize && success || failure + RETVAL=$? + rm -f $VAR_SUBSYS_EBTABLES + ;; + save) + save + ;; + *) + echo "usage: ${0##*/} {start|stop|save}" >&2 + RETVAL=2 + ;; +esac + +exit $RETVAL diff --git a/SOURCES/ebtables.service b/SOURCES/ebtables.service new file mode 100644 index 0000000..b096f1d --- /dev/null +++ b/SOURCES/ebtables.service @@ -0,0 +1,11 @@ +[Unit] +Description=Ethernet Bridge Filtering tables + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/libexec/ebtables-helper start +ExecStop=/usr/libexec/ebtables-helper stop + +[Install] +WantedBy=multi-user.target diff --git a/SOURCES/iptables-1.8.8.tar.bz2 b/SOURCES/iptables-1.8.8.tar.bz2 new file mode 100644 index 0000000..6704ee6 Binary files /dev/null and b/SOURCES/iptables-1.8.8.tar.bz2 differ diff --git a/SOURCES/iptables-config b/SOURCES/iptables-config new file mode 100644 index 0000000..3d7e176 --- /dev/null +++ b/SOURCES/iptables-config @@ -0,0 +1,59 @@ +# Load additional iptables modules (nat helpers) +# Default: -none- +# Space separated list of nat helpers (e.g. 'ip_nat_ftp ip_nat_irc'), which +# are loaded after the firewall rules are applied. Options for the helpers are +# stored in /etc/modprobe.conf. +IPTABLES_MODULES="" + +# Save current firewall rules on stop. +# Value: yes|no, default: no +# Saves all firewall rules to /etc/sysconfig/iptables if firewall gets stopped +# (e.g. on system shutdown). +IPTABLES_SAVE_ON_STOP="no" + +# Save current firewall rules on restart. +# Value: yes|no, default: no +# Saves all firewall rules to /etc/sysconfig/iptables if firewall gets +# restarted. +IPTABLES_SAVE_ON_RESTART="no" + +# Save (and restore) rule and chain counter. +# Value: yes|no, default: no +# Save counters for rules and chains to /etc/sysconfig/iptables if +# 'service iptables save' is called or on stop or restart if SAVE_ON_STOP or +# SAVE_ON_RESTART is enabled. +IPTABLES_SAVE_COUNTER="no" + +# Numeric status output +# Value: yes|no, default: yes +# Print IP addresses and port numbers in numeric format in the status output. +IPTABLES_STATUS_NUMERIC="yes" + +# Verbose status output +# Value: yes|no, default: yes +# Print info about the number of packets and bytes plus the "input-" and +# "outputdevice" in the status output. +IPTABLES_STATUS_VERBOSE="no" + +# Status output with numbered lines +# Value: yes|no, default: yes +# Print a counter/number for every rule in the status output. +IPTABLES_STATUS_LINENUMBERS="yes" + +# Reload sysctl settings on start and restart +# Default: -none- +# Space separated list of sysctl items which are to be reloaded on start. +# List items will be matched by fgrep. +#IPTABLES_SYSCTL_LOAD_LIST=".nf_conntrack .bridge-nf" + +# Set wait option for iptables-restore calls in seconds +# Default: 600 +# Set to 0 to deactivate the wait. +#IPTABLES_RESTORE_WAIT=600 + +# Set wait interval option for iptables-restore calls in microseconds +# Default: 1000000 +# Set to 100000 to try to get the lock every 100000 microseconds, 10 times a +# second. +# Only usable with IPTABLES_RESTORE_WAIT > 0 +#IPTABLES_RESTORE_WAIT_INTERVAL=1000000 diff --git a/SOURCES/iptables-test.stderr.expect b/SOURCES/iptables-test.stderr.expect new file mode 100644 index 0000000..fb27f35 --- /dev/null +++ b/SOURCES/iptables-test.stderr.expect @@ -0,0 +1,35 @@ +extensions/libip6t_srh.t: ERROR: line 2 (cannot load: ip6tables -A INPUT -m srh --srh-next-hdr 17) +extensions/libip6t_srh.t: ERROR: line 3 (cannot load: ip6tables -A INPUT -m srh --srh-hdr-len-eq 8) +extensions/libip6t_srh.t: ERROR: line 4 (cannot load: ip6tables -A INPUT -m srh --srh-hdr-len-gt 8) +extensions/libip6t_srh.t: ERROR: line 5 (cannot load: ip6tables -A INPUT -m srh --srh-hdr-len-lt 8) +extensions/libip6t_srh.t: ERROR: line 6 (cannot load: ip6tables -A INPUT -m srh --srh-segs-left-eq 1) +extensions/libip6t_srh.t: ERROR: line 7 (cannot load: ip6tables -A INPUT -m srh --srh-segs-left-gt 1) +extensions/libip6t_srh.t: ERROR: line 8 (cannot load: ip6tables -A INPUT -m srh --srh-segs-left-lt 1) +extensions/libip6t_srh.t: ERROR: line 9 (cannot load: ip6tables -A INPUT -m srh --srh-last-entry-eq 4) +extensions/libip6t_srh.t: ERROR: line 10 (cannot load: ip6tables -A INPUT -m srh --srh-last-entry-gt 4) +extensions/libip6t_srh.t: ERROR: line 11 (cannot load: ip6tables -A INPUT -m srh --srh-last-entry-lt 4) +extensions/libip6t_srh.t: ERROR: line 12 (cannot load: ip6tables -A INPUT -m srh --srh-tag 0) +extensions/libip6t_srh.t: ERROR: line 13 (cannot load: ip6tables -A INPUT -m srh ! --srh-next-hdr 17) +extensions/libip6t_srh.t: ERROR: line 14 (cannot load: ip6tables -A INPUT -m srh ! --srh-hdr-len-eq 8) +extensions/libip6t_srh.t: ERROR: line 15 (cannot load: ip6tables -A INPUT -m srh ! --srh-hdr-len-gt 8) +extensions/libip6t_srh.t: ERROR: line 16 (cannot load: ip6tables -A INPUT -m srh ! --srh-hdr-len-lt 8) +extensions/libip6t_srh.t: ERROR: line 17 (cannot load: ip6tables -A INPUT -m srh ! --srh-segs-left-eq 1) +extensions/libip6t_srh.t: ERROR: line 18 (cannot load: ip6tables -A INPUT -m srh ! --srh-segs-left-gt 1) +extensions/libip6t_srh.t: ERROR: line 19 (cannot load: ip6tables -A INPUT -m srh ! --srh-segs-left-lt 1) +extensions/libip6t_srh.t: ERROR: line 20 (cannot load: ip6tables -A INPUT -m srh ! --srh-last-entry-eq 4) +extensions/libip6t_srh.t: ERROR: line 21 (cannot load: ip6tables -A INPUT -m srh ! --srh-last-entry-gt 4) +extensions/libip6t_srh.t: ERROR: line 22 (cannot load: ip6tables -A INPUT -m srh ! --srh-last-entry-lt 4) +extensions/libip6t_srh.t: ERROR: line 23 (cannot load: ip6tables -A INPUT -m srh ! --srh-tag 0) +extensions/libip6t_srh.t: ERROR: line 24 (cannot load: ip6tables -A INPUT -m srh --srh-next-hdr 17 --srh-segs-left-eq 1 --srh-last-entry-eq 4 --srh-tag 0) +extensions/libip6t_srh.t: ERROR: line 25 (cannot load: ip6tables -A INPUT -m srh ! --srh-next-hdr 17 ! --srh-segs-left-eq 0 --srh-tag 0) +extensions/libip6t_srh.t: ERROR: line 26 (cannot load: ip6tables -A INPUT -m srh --srh-psid a::/64 --srh-nsid b::/128 --srh-lsid c::/0) +extensions/libip6t_srh.t: ERROR: line 27 (cannot load: ip6tables -A INPUT -m srh ! --srh-psid a::/64 ! --srh-nsid b::/128 ! --srh-lsid c::/0) +extensions/libip6t_srh.t: ERROR: line 28 (cannot load: ip6tables -A INPUT -m srh) +extensions/libxt_LED.t: ERROR: line 3 (cannot load: iptables -A INPUT -j LED --led-trigger-id "foo") +extensions/libxt_LED.t: ERROR: line 4 (cannot load: iptables -A INPUT -j LED --led-trigger-id "foo" --led-delay 42 --led-always-blink) +extensions/libxt_ipcomp.t: ERROR: line 2 (cannot load: iptables -A INPUT -p ipcomp -m ipcomp --ipcompspi 18 -j DROP) +extensions/libxt_ipcomp.t: ERROR: line 3 (cannot load: iptables -A INPUT -p ipcomp -m ipcomp ! --ipcompspi 18 -j ACCEPT) +extensions/libxt_time.t: ERROR: line 2 (cannot load: iptables -A INPUT -m time --timestart 01:02:03 --timestop 04:05:06 --monthdays 1,2,3,4,5 --weekdays Mon,Fri,Sun --datestart 2001-02-03T04:05:06 --datestop 2012-09-08T09:06:05 --kerneltz) +extensions/libxt_time.t: ERROR: line 3 (cannot load: iptables -A INPUT -m time --timestart 01:02:03 --timestop 04:05:06 --monthdays 1,2,3,4,5 --weekdays Mon,Fri,Sun --datestart 2001-02-03T04:05:06 --datestop 2012-09-08T09:06:05) +extensions/libxt_time.t: ERROR: line 4 (cannot load: iptables -A INPUT -m time --timestart 02:00:00 --timestop 03:00:00 --datestart 1970-01-01T02:00:00 --datestop 1970-01-01T03:00:00) +extensions/libxt_u32.t: ERROR: line 2 (cannot load: iptables -A INPUT -m u32 --u32 "0x0=0x0&&0x0=0x1") diff --git a/SOURCES/iptables.init b/SOURCES/iptables.init new file mode 100755 index 0000000..ffbd742 --- /dev/null +++ b/SOURCES/iptables.init @@ -0,0 +1,450 @@ +#!/bin/bash +# +# iptables Start iptables firewall +# +# chkconfig: 2345 08 92 +# description: Starts, stops and saves iptables firewall +# +# config: /etc/sysconfig/iptables +# config: /etc/sysconfig/iptables-config +# +### BEGIN INIT INFO +# Provides: iptables +# Required-Start: +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: start and stop iptables firewall +# Description: Start, stop and save iptables firewall +### END INIT INFO + +# compat for removed initscripts dependency + +success() { + echo -n "[ OK ]" + return 0 +} + +warning() { + echo -n "[WARNING]" + return 1 +} + +failure() { + echo -n "[FAILED]" + return 1 +} + +IPTABLES=iptables +IPTABLES_DATA=/etc/sysconfig/$IPTABLES +IPTABLES_FALLBACK_DATA=${IPTABLES_DATA}.fallback +IPTABLES_CONFIG=/etc/sysconfig/${IPTABLES}-config +IPV=${IPTABLES%tables} # ip for ipv4 | ip6 for ipv6 +[ "$IPV" = "ip" ] && _IPV="ipv4" || _IPV="ipv6" +PROC_IPTABLES_NAMES=/proc/net/${IPV}_tables_names +VAR_SUBSYS_IPTABLES=/var/lock/subsys/$IPTABLES + +# only usable for root +if [ $EUID != 0 ]; then + echo -n $"${IPTABLES}: Only usable by root."; warning; echo + exit 4 +fi + +if [ ! -x /sbin/$IPTABLES ]; then + echo -n $"${IPTABLES}: /sbin/$IPTABLES does not exist."; warning; echo + exit 5 +fi + +# Default firewall configuration: +IPTABLES_MODULES="" +IPTABLES_SAVE_ON_STOP="no" +IPTABLES_SAVE_ON_RESTART="no" +IPTABLES_SAVE_COUNTER="no" +IPTABLES_STATUS_NUMERIC="yes" +IPTABLES_STATUS_VERBOSE="no" +IPTABLES_STATUS_LINENUMBERS="yes" +IPTABLES_SYSCTL_LOAD_LIST="" +IPTABLES_RESTORE_WAIT=600 +IPTABLES_RESTORE_WAIT_INTERVAL=1000000 + +# Load firewall configuration. +[ -f "$IPTABLES_CONFIG" ] && . "$IPTABLES_CONFIG" + +is_iptables_nft() { + iptables --version | grep -q '(nf_tables)' +} + +netfilter_active() { + is_iptables_nft && return 0 + [ -e "$PROC_IPTABLES_NAMES" ] +} + +netfilter_tables() { + netfilter_active || return 1 + is_iptables_nft && { + # explicitly omit security table from this list as + # it should be reserved for SELinux use + echo "raw mangle filter nat" + return 0 + } + cat "$PROC_IPTABLES_NAMES" 2>/dev/null +} + +# Get active tables +NF_TABLES=$(netfilter_tables) + + +flush_n_delete() { + # Flush firewall rules and delete chains. + netfilter_active || return 0 + + # Check if firewall is configured (has tables) + [ -z "$NF_TABLES" ] && return 1 + + echo -n $"${IPTABLES}: Flushing firewall rules: " + ret=0 + # For all tables + for i in $NF_TABLES; do + # Flush firewall rules. + $IPTABLES -t $i -F; + let ret+=$?; + + # Delete firewall chains. + $IPTABLES -t $i -X; + let ret+=$?; + + # Set counter to zero. + $IPTABLES -t $i -Z; + let ret+=$?; + done + + [ $ret -eq 0 ] && success || failure + echo + return $ret +} + +set_policy() { + # Set policy for configured tables. + policy=$1 + + # Check if iptable module is loaded + netfilter_active || return 0 + + # Check if firewall is configured (has tables) + tables=$(netfilter_tables) + [ -z "$tables" ] && return 1 + + echo -n $"${IPTABLES}: Setting chains to policy $policy: " + ret=0 + for i in $tables; do + echo -n "$i " + case "$i" in + raw) + $IPTABLES -t raw -P PREROUTING $policy \ + && $IPTABLES -t raw -P OUTPUT $policy \ + || let ret+=1 + ;; + filter) + $IPTABLES -t filter -P INPUT $policy \ + && $IPTABLES -t filter -P OUTPUT $policy \ + && $IPTABLES -t filter -P FORWARD $policy \ + || let ret+=1 + ;; + nat) + $IPTABLES -t nat -P PREROUTING $policy \ + && $IPTABLES -t nat -P POSTROUTING $policy \ + && $IPTABLES -t nat -P OUTPUT $policy \ + || let ret+=1 + ;; + mangle) + $IPTABLES -t mangle -P PREROUTING $policy \ + && $IPTABLES -t mangle -P POSTROUTING $policy \ + && $IPTABLES -t mangle -P INPUT $policy \ + && $IPTABLES -t mangle -P OUTPUT $policy \ + && $IPTABLES -t mangle -P FORWARD $policy \ + || let ret+=1 + ;; + *) + let ret+=1 + ;; + esac + done + + [ $ret -eq 0 ] && success || failure + echo + return $ret +} + +load_sysctl() { + # load matched sysctl values + if [ -n "$IPTABLES_SYSCTL_LOAD_LIST" ]; then + echo -n $"Loading sysctl settings: " + ret=0 + for item in $IPTABLES_SYSCTL_LOAD_LIST; do + fgrep -hs $item /etc/sysctl.d/*.conf | sysctl -p - >/dev/null + let ret+=$?; + done + [ $ret -eq 0 ] && success || failure + echo + fi + return $ret +} + +start() { + # Do not start if there is no config file. + if [ ! -f "$IPTABLES_DATA" ]; then + echo -n $"${IPTABLES}: No config file."; warning; echo + return 6 + fi + + # check if ipv6 module load is deactivated + if [ "${_IPV}" = "ipv6" ] \ + && grep -qIsE "^install[[:space:]]+${_IPV}[[:space:]]+/bin/(true|false)" /etc/modprobe.conf /etc/modprobe.d/* ; then + echo $"${IPTABLES}: ${_IPV} is disabled." + return 150 + fi + + echo -n $"${IPTABLES}: Applying firewall rules: " + + OPT= + [ "x$IPTABLES_SAVE_COUNTER" = "xyes" ] && OPT="-c" + if [ $IPTABLES_RESTORE_WAIT -ne 0 ]; then + OPT="${OPT} --wait ${IPTABLES_RESTORE_WAIT}" + if [ $IPTABLES_RESTORE_WAIT_INTERVAL -lt 1000000 ]; then + OPT="${OPT} --wait-interval ${IPTABLES_RESTORE_WAIT_INTERVAL}" + fi + fi + + $IPTABLES-restore $OPT $IPTABLES_DATA + if [ $? -eq 0 ]; then + success; echo + else + failure; echo; + if [ -f "$IPTABLES_FALLBACK_DATA" ]; then + echo -n $"${IPTABLES}: Applying firewall fallback rules: " + $IPTABLES-restore $OPT $IPTABLES_FALLBACK_DATA + if [ $? -eq 0 ]; then + success; echo + else + failure; echo; return 1 + fi + else + return 1 + fi + fi + + # Load additional modules (helpers) + if [ -n "$IPTABLES_MODULES" ]; then + echo -n $"${IPTABLES}: Loading additional modules: " + ret=0 + for mod in $IPTABLES_MODULES; do + echo -n "$mod " + modprobe $mod > /dev/null 2>&1 + let ret+=$?; + done + [ $ret -eq 0 ] && success || failure + echo + fi + + # Load sysctl settings + load_sysctl + + touch $VAR_SUBSYS_IPTABLES + return $ret +} + +stop() { + # Do not stop if iptables module is not loaded. + netfilter_active || return 0 + + # Set default chain policy to ACCEPT, in order to not break shutdown + # on systems where the default policy is DROP and root device is + # network-based (i.e.: iSCSI, NFS) + set_policy ACCEPT + # And then, flush the rules and delete chains + flush_n_delete + + rm -f $VAR_SUBSYS_IPTABLES + return $ret +} + +save() { + # Check if iptable module is loaded + if ! netfilter_active; then + echo -n $"${IPTABLES}: Nothing to save."; warning; echo + return 0 + fi + + # Check if firewall is configured (has tables) + if [ -z "$NF_TABLES" ]; then + echo -n $"${IPTABLES}: Nothing to save."; warning; echo + return 6 + fi + + echo -n $"${IPTABLES}: Saving firewall rules to $IPTABLES_DATA: " + + OPT= + [ "x$IPTABLES_SAVE_COUNTER" = "xyes" ] && OPT="-c" + + ret=0 + TMP_FILE=$(/bin/mktemp -q $IPTABLES_DATA.XXXXXX) \ + && chmod 600 "$TMP_FILE" \ + && $IPTABLES-save $OPT > $TMP_FILE 2>/dev/null \ + && size=$(stat -c '%s' $TMP_FILE) && [ $size -gt 0 ] \ + || ret=1 + if [ $ret -eq 0 ]; then + if [ -e $IPTABLES_DATA ]; then + cp -f $IPTABLES_DATA $IPTABLES_DATA.save \ + && chmod 600 $IPTABLES_DATA.save \ + && restorecon $IPTABLES_DATA.save \ + || ret=1 + fi + if [ $ret -eq 0 ]; then + mv -f $TMP_FILE $IPTABLES_DATA \ + && chmod 600 $IPTABLES_DATA \ + && restorecon $IPTABLES_DATA \ + || ret=1 + fi + fi + rm -f $TMP_FILE + [ $ret -eq 0 ] && success || failure + echo + return $ret +} + +status() { + if [ ! -f "$VAR_SUBSYS_IPTABLES" ]; then + echo $"${IPTABLES}: Firewall is not running." + return 3 + fi + + # Do not print status if lockfile is missing and iptables modules are not + # loaded. + # Check if iptable modules are loaded + if ! netfilter_active; then + echo $"${IPTABLES}: Firewall modules are not loaded." + return 3 + fi + + # Check if firewall is configured (has tables) + if [ -z "$NF_TABLES" ]; then + echo $"${IPTABLES}: Firewall is not configured. " + return 3 + fi + + NUM= + [ "x$IPTABLES_STATUS_NUMERIC" = "xyes" ] && NUM="-n" + VERBOSE= + [ "x$IPTABLES_STATUS_VERBOSE" = "xyes" ] && VERBOSE="--verbose" + COUNT= + [ "x$IPTABLES_STATUS_LINENUMBERS" = "xyes" ] && COUNT="--line-numbers" + + for table in $NF_TABLES; do + echo $"Table: $table" + $IPTABLES -t $table --list $NUM $VERBOSE $COUNT && echo + done + + return 0 +} + +reload() { + # Do not reload if there is no config file. + if [ ! -f "$IPTABLES_DATA" ]; then + echo -n $"${IPTABLES}: No config file."; warning; echo + return 6 + fi + + # check if ipv6 module load is deactivated + if [ "${_IPV}" = "ipv6" ] \ + && grep -qIsE "^install[[:space:]]+${_IPV}[[:space:]]+/bin/(true|false)" /etc/modprobe.conf /etc/modprobe.d/* ; then + echo $"${IPTABLES}: ${_IPV} is disabled." + return 150 + fi + + echo -n $"${IPTABLES}: Trying to reload firewall rules: " + + OPT= + [ "x$IPTABLES_SAVE_COUNTER" = "xyes" ] && OPT="-c" + if [ $IPTABLES_RESTORE_WAIT -ne 0 ]; then + OPT="${OPT} --wait ${IPTABLES_RESTORE_WAIT}" + if [ $IPTABLES_RESTORE_WAIT_INTERVAL -lt 1000000 ]; then + OPT="${OPT} --wait-interval ${IPTABLES_RESTORE_WAIT_INTERVAL}" + fi + fi + + $IPTABLES-restore $OPT $IPTABLES_DATA + if [ $? -eq 0 ]; then + success; echo + else + failure; echo; echo "Firewall rules are not changed."; return 1 + fi + + # Load additional modules (helpers) + if [ -n "$IPTABLES_MODULES" ]; then + echo -n $"${IPTABLES}: Loading additional modules: " + ret=0 + for mod in $IPTABLES_MODULES; do + echo -n "$mod " + modprobe $mod > /dev/null 2>&1 + let ret+=$?; + done + [ $ret -eq 0 ] && success || failure + echo + fi + + # Load sysctl settings + load_sysctl + + return $ret +} + +restart() { + [ "x$IPTABLES_SAVE_ON_RESTART" = "xyes" ] && save + stop + start +} + + +case "$1" in + start) + [ -f "$VAR_SUBSYS_IPTABLES" ] && exit 0 + start + RETVAL=$? + ;; + stop) + [ "x$IPTABLES_SAVE_ON_STOP" = "xyes" ] && save + stop + RETVAL=$? + ;; + restart|force-reload) + restart + RETVAL=$? + ;; + reload) + [ -e "$VAR_SUBSYS_IPTABLES" ] && reload + RETVAL=$? + ;; + condrestart|try-restart) + [ ! -e "$VAR_SUBSYS_IPTABLES" ] && exit 0 + restart + RETVAL=$? + ;; + status) + status + RETVAL=$? + ;; + panic) + set_policy DROP + RETVAL=$? + ;; + save) + save + RETVAL=$? + ;; + *) + echo $"Usage: ${IPTABLES} {start|stop|reload|restart|condrestart|status|panic|save}" + RETVAL=2 + ;; +esac + +exit $RETVAL diff --git a/SOURCES/iptables.service b/SOURCES/iptables.service new file mode 100644 index 0000000..6b996d1 --- /dev/null +++ b/SOURCES/iptables.service @@ -0,0 +1,17 @@ +[Unit] +Description=IPv4 firewall with iptables +AssertPathExists=/etc/sysconfig/iptables +Before=network-pre.target +Wants=network-pre.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/libexec/iptables/iptables.init start +ExecReload=/usr/libexec/iptables/iptables.init reload +ExecStop=/usr/libexec/iptables/iptables.init stop +Environment=BOOTUP=serial +Environment=CONSOLETYPE=serial + +[Install] +WantedBy=multi-user.target diff --git a/SOURCES/sysconfig_ip6tables b/SOURCES/sysconfig_ip6tables new file mode 100644 index 0000000..34b8b87 --- /dev/null +++ b/SOURCES/sysconfig_ip6tables @@ -0,0 +1,15 @@ +# sample configuration for ip6tables service +# you can edit this manually or use system-config-firewall +# please do not ask us to add additional ports/services to this default configuration +*filter +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p ipv6-icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT +-A INPUT -d fe80::/64 -p udp -m udp --dport 546 -m state --state NEW -j ACCEPT +-A INPUT -j REJECT --reject-with icmp6-adm-prohibited +-A FORWARD -j REJECT --reject-with icmp6-adm-prohibited +COMMIT diff --git a/SOURCES/sysconfig_iptables b/SOURCES/sysconfig_iptables new file mode 100644 index 0000000..5183250 --- /dev/null +++ b/SOURCES/sysconfig_iptables @@ -0,0 +1,14 @@ +# sample configuration for iptables service +# you can edit this manually or use system-config-firewall +# please do not ask us to add additional ports/services to this default configuration +*filter +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT +-A INPUT -j REJECT --reject-with icmp-host-prohibited +-A FORWARD -j REJECT --reject-with icmp-host-prohibited +COMMIT diff --git a/SPECS/iptables.spec b/SPECS/iptables.spec new file mode 100644 index 0000000..b464b77 --- /dev/null +++ b/SPECS/iptables.spec @@ -0,0 +1,1754 @@ +# install init scripts to /usr/libexec with systemd +%global script_path %{_libexecdir}/iptables + +# service legacy actions (RHBZ#748134) +%global legacy_actions %{_libexecdir}/initscripts/legacy-actions + +%global iptc_so_ver 0 +%global ipXtc_so_ver 2 + +# build legacy sub-packages only on non-rhel distributions +%global do_legacy_pkg ! 0%{?rhel} + +%define _unpackaged_files_terminate_build 0 + +Name: iptables +Summary: Tools for managing Linux kernel packet filtering capabilities +URL: https://www.netfilter.org/projects/iptables +Version: 1.8.8 +Release: 6%{?dist} +Source: %{url}/files/%{name}-%{version}.tar.bz2 +Source1: iptables.init +Source2: iptables-config +Source3: iptables.service +Source4: sysconfig_iptables +Source5: sysconfig_ip6tables +Source6: arptables-nft-helper +Source7: arptables.service +Source8: ebtables-helper +Source9: ebtables.service +Source10: ebtables-config +Source11: iptables-test.stderr.expect + +Patch01: 0001-doc-Add-deprecation-notices-to-all-relevant-man-page.patch +Patch02: 0002-extensions-SECMARK-Use-a-better-context-in-test-case.patch +Patch03: 0003-xshared-Fix-build-for-Werror-format-security.patch +Patch04: 0004-tests-shell-Check-overhead-in-iptables-save-and-rest.patch +Patch05: 0005-arptables-Support-x-exact-flag.patch +Patch06: 0006-libxtables-Fix-unsupported-extension-warning-corner-.patch +Patch07: 0007-nft-fix-ebtables-among-match-when-mac-ip-addresses-a.patch +Patch08: 0008-nft-un-break-among-match-with-concatenation.patch + +# pf.os: ISC license +# iptables-apply: Artistic 2.0 +License: GPLv2 and Artistic 2.0 and ISC + +# libnetfilter_conntrack is needed for xt_connlabel +BuildRequires: pkgconfig(libnetfilter_conntrack) +# libnfnetlink-devel is requires for nfnl_osf +BuildRequires: pkgconfig(libnfnetlink) +BuildRequires: libselinux-devel +BuildRequires: kernel-headers +BuildRequires: systemd +# libmnl, libnftnl, bison, flex for nftables +BuildRequires: bison +BuildRequires: flex +BuildRequires: gcc +BuildRequires: pkgconfig(libmnl) >= 1.0 +BuildRequires: pkgconfig(libnftnl) >= 1.1.6 +# libpcap-devel for nfbpf_compile +BuildRequires: libpcap-devel +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: make + +%description +The iptables utility controls the network packet filtering code in the +Linux kernel. If you need to set up firewalls and/or IP masquerading, +you should install this package. + +%package legacy +Summary: Legacy tools for managing Linux kernel packet filtering capabilities +Requires: %{name}-legacy-libs%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Conflicts: setup < 2.10.4-1 +Requires(post): %{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives +Obsoletes: %{name} < %{version}-%{release} +Provides: iptables + +%description legacy +The iptables utility controls the network packet filtering code in the +Linux kernel. This package contains the legacy tools which are obsoleted by +nft-variants in iptables-nft package for backwards compatibility reasons. +If you need to set up firewalls and/or IP masquerading, you should not install +this package but either nftables or iptables-nft instead. + +%package libs +Summary: libxtables and iptables extensions userspace support + +%description libs +libxtables and associated shared object files + +Libxtables provides unified access to iptables extensions in userspace. Data +and logic for those is kept in per-extension shared object files. + +%package legacy-libs +Summary: iptables legacy libraries +Obsoletes: %{name}-libs < %{version}-%{release} + +%description legacy-libs +iptables libraries. + +Please remember that libip*tc libraries do neither have a stable API nor a real so version. + +For more information about this, please have a look at + + http://www.netfilter.org/documentation/FAQ/netfilter-faq-4.html#ss4.5 + +%package devel +Summary: Development package for iptables +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: pkgconfig + +%description devel +libxtables development headers and pkgconfig files + +%package legacy-devel +Summary: Development package for legacy iptables +Requires: %{name}-legacy-libs%{?_isa} = %{version}-%{release} +Requires: pkgconfig + +%description legacy-devel +Legacy iptables development headers and pkgconfig files + +The iptc libraries are marked as not public by upstream. The interface is not +stable and may change with every new version. It is therefore unsupported. + +%package services +Summary: iptables and ip6tables services for iptables +Requires: %{name} = %{version}-%{release} +%{?systemd_ordering} +BuildArch: noarch + +%description services +iptables services for IPv4 and IPv6 + +This package provides the services iptables and ip6tables that have been split +out of the base package since they are not active by default anymore. + +%package nft-services +Summary: Services for nft-variants of iptables, ebtables and arptables +Requires: %{name}-nft = %{version}-%{release} +Conflicts: arptables-services +Conflicts: ebtables-services +Provides: iptables-services = %{version}-%{release} +Provides: arptables-services +Provides: ebtables-services +Obsoletes: iptables-services <= 1.8.4 +Obsoletes: iptables-arptables <= 1.8.4 +Obsoletes: iptables-ebtables <= 1.8.4 +Obsoletes: iptables-nft-compat <= 1.8.7-19 +%{?systemd_ordering} +BuildArch: noarch + +%description nft-services +Services for nft-variants of iptables, ebtables and arptables + +This package provides the services iptables, ip6tables, arptables and ebtables +for use with iptables-nft which provides nft-variants of these tools. + +%package utils +Summary: iptables and ip6tables misc utilities +Requires: %{name} = %{version}-%{release} + +%description utils +Utils for iptables + +This package provides nfnl_osf with the pf.os database and nfbpf_compile, +a bytecode generator for use with xt_bpf. Also included is iptables-apply, +a safer way to update iptables remotely. + +%package nft +Summary: nftables compatibility for iptables, arptables and ebtables +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires(post): %{_sbindir}/update-alternatives +Requires(post): %{_bindir}/readlink +Requires(postun): %{_sbindir}/update-alternatives +Provides: arptables-helper +Provides: iptables +Provides: arptables +Provides: ebtables +Obsoletes: iptables <= 1.8.4 + +%description nft +nftables compatibility for iptables, arptables and ebtables. + +%prep +%autosetup -p1 +cp %{SOURCE11} . + +%build +./autogen.sh +CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing " \ +%configure --enable-devel --enable-bpf-compiler --with-kernel=/usr --with-kbuild=/usr --with-ksource=/usr + +# do not use rpath +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +rm -f include/linux/types.h + +%make_build + +%install +%make_install +# remove la file(s) +rm -f %{buildroot}%{_libdir}/*.la + +# install init scripts and configuration files +install -d -m 755 %{buildroot}%{script_path} +install -c -m 755 %{SOURCE1} %{buildroot}%{script_path}/iptables.init +sed -e 's;iptables;ip6tables;g' -e 's;IPTABLES;IP6TABLES;g' < %{SOURCE1} > ip6tables.init +install -c -m 755 ip6tables.init %{buildroot}%{script_path}/ip6tables.init +install -d -m 755 %{buildroot}%{_sysconfdir}/sysconfig +install -c -m 600 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/iptables-config +sed -e 's;iptables;ip6tables;g' -e 's;IPTABLES;IP6TABLES;g' < %{SOURCE2} > ip6tables-config +install -c -m 600 ip6tables-config %{buildroot}%{_sysconfdir}/sysconfig/ip6tables-config +install -c -m 600 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/iptables +install -c -m 600 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/ip6tables + +# install systemd service files +install -d -m 755 %{buildroot}/%{_unitdir} +install -c -m 644 %{SOURCE3} %{buildroot}/%{_unitdir} +sed -e 's;iptables;ip6tables;g' -e 's;IPv4;IPv6;g' -e 's;/usr/libexec/ip6tables;/usr/libexec/iptables;g' < %{SOURCE3} > ip6tables.service +install -c -m 644 ip6tables.service %{buildroot}/%{_unitdir} + +# install legacy actions for service command +install -d %{buildroot}/%{legacy_actions}/iptables +install -d %{buildroot}/%{legacy_actions}/ip6tables + +cat << EOF > %{buildroot}/%{legacy_actions}/iptables/save +#!/bin/bash +exec %{script_path}/iptables.init save +EOF +chmod 755 %{buildroot}/%{legacy_actions}/iptables/save +sed -e 's;iptables.init;ip6tables.init;g' -e 's;IPTABLES;IP6TABLES;g' < %{buildroot}/%{legacy_actions}/iptables/save > ip6tabes.save-legacy +install -c -m 755 ip6tabes.save-legacy %{buildroot}/%{legacy_actions}/ip6tables/save + +cat << EOF > %{buildroot}/%{legacy_actions}/iptables/panic +#!/bin/bash +exec %{script_path}/iptables.init panic +EOF +chmod 755 %{buildroot}/%{legacy_actions}/iptables/panic +sed -e 's;iptables.init;ip6tables.init;g' -e 's;IPTABLES;IP6TABLES;g' < %{buildroot}/%{legacy_actions}/iptables/panic > ip6tabes.panic-legacy +install -c -m 755 ip6tabes.panic-legacy %{buildroot}/%{legacy_actions}/ip6tables/panic + +# Remove /etc/ethertypes (now part of setup) +rm -f %{buildroot}%{_sysconfdir}/ethertypes + +# extra sources for arptables +install -p -D -m 755 %{SOURCE6} %{buildroot}%{_libexecdir}/arptables-nft-helper +install -p -D -m 644 %{SOURCE7} %{buildroot}%{_unitdir}/arptables.service +touch %{buildroot}%{_sysconfdir}/sysconfig/arptables + +# extra sources for ebtables +install -p %{SOURCE9} %{buildroot}%{_unitdir}/ +install -m0755 %{SOURCE8} %{buildroot}%{_libexecdir}/ebtables-helper +install -m0600 %{SOURCE10} %{buildroot}%{_sysconfdir}/sysconfig/ebtables-config +touch %{buildroot}%{_sysconfdir}/sysconfig/ebtables + +# prepare for alternatives +touch %{buildroot}%{_libexecdir}/arptables-helper +touch %{buildroot}%{_mandir}/man8/arptables.8 +touch %{buildroot}%{_mandir}/man8/arptables-save.8 +touch %{buildroot}%{_mandir}/man8/arptables-restore.8 +touch %{buildroot}%{_mandir}/man8/ebtables.8 + +%ldconfig_scriptlets + +%post legacy +pfx=%{_sbindir}/iptables +pfx6=%{_sbindir}/ip6tables +%{_sbindir}/update-alternatives --install \ + $pfx iptables $pfx-legacy 10 \ + --slave $pfx6 ip6tables $pfx6-legacy \ + --slave $pfx-restore iptables-restore $pfx-legacy-restore \ + --slave $pfx-save iptables-save $pfx-legacy-save \ + --slave $pfx6-restore ip6tables-restore $pfx6-legacy-restore \ + --slave $pfx6-save ip6tables-save $pfx6-legacy-save + +%postun legacy +if [ $1 -eq 0 ]; then + %{_sbindir}/update-alternatives --remove \ + iptables %{_sbindir}/iptables-legacy +fi + +%post services +%systemd_post iptables.service ip6tables.service + +%preun services +%systemd_preun iptables.service ip6tables.service + +%postun services +%?ldconfig +%systemd_postun iptables.service ip6tables.service + +%post nft-services +%systemd_post iptables.service ip6tables.service +%systemd_post arptables.service ebtables.service + +%preun nft-services +%systemd_preun iptables.service ip6tables.service +%systemd_preun arptables.service ebtables.service + +%postun nft-services +%?ldconfig +%systemd_postun iptables.service ip6tables.service +%systemd_postun arptables.service ebtables.service + +%post nft +pfx=%{_sbindir}/iptables +pfx6=%{_sbindir}/ip6tables +%{_sbindir}/update-alternatives --install \ + $pfx iptables $pfx-nft 10 \ + --slave $pfx6 ip6tables $pfx6-nft \ + --slave $pfx-restore iptables-restore $pfx-nft-restore \ + --slave $pfx-save iptables-save $pfx-nft-save \ + --slave $pfx6-restore ip6tables-restore $pfx6-nft-restore \ + --slave $pfx6-save ip6tables-save $pfx6-nft-save + +pfx=%{_sbindir}/ebtables +manpfx=%{_mandir}/man8/ebtables +for sfx in "" "-restore" "-save"; do + if [ "$(readlink -e $pfx$sfx)" == $pfx$sfx ]; then + rm -f $pfx$sfx + fi +done +if [ "$(readlink -e $manpfx.8.gz)" == $manpfx.8.gz ]; then + rm -f $manpfx.8.gz +fi +%{_sbindir}/update-alternatives --install \ + $pfx ebtables $pfx-nft 10 \ + --slave $pfx-save ebtables-save $pfx-nft-save \ + --slave $pfx-restore ebtables-restore $pfx-nft-restore \ + --slave $manpfx.8.gz ebtables-man $manpfx-nft.8.gz + +pfx=%{_sbindir}/arptables +manpfx=%{_mandir}/man8/arptables +lepfx=%{_libexecdir}/arptables +for sfx in "" "-restore" "-save"; do + if [ "$(readlink -e $pfx$sfx)" == $pfx$sfx ]; then + rm -f $pfx$sfx + fi + if [ "$(readlink -e $manpfx$sfx.8.gz)" == $manpfx$sfx.8.gz ]; then + rm -f $manpfx$sfx.8.gz + fi +done +if [ "$(readlink -e $lepfx-helper)" == $lepfx-helper ]; then + rm -f $lepfx-helper +fi +%{_sbindir}/update-alternatives --install \ + $pfx arptables $pfx-nft 10 \ + --slave $pfx-save arptables-save $pfx-nft-save \ + --slave $pfx-restore arptables-restore $pfx-nft-restore \ + --slave $manpfx.8.gz arptables-man $manpfx-nft.8.gz \ + --slave $manpfx-save.8.gz arptables-save-man $manpfx-nft-save.8.gz \ + --slave $manpfx-restore.8.gz arptables-restore-man $manpfx-nft-restore.8.gz \ + --slave $lepfx-helper arptables-helper $lepfx-nft-helper + +%postun nft +if [ $1 -eq 0 ]; then + for cmd in iptables ebtables arptables; do + %{_sbindir}/update-alternatives --remove \ + $cmd %{_sbindir}/$cmd-nft + done +fi + +%if %{do_legacy_pkg} + +%files legacy +%doc INCOMPATIBILITIES +%{_sbindir}/ip{,6}tables-legacy* +%{_sbindir}/xtables-legacy-multi +%{_bindir}/iptables-xml +%{_mandir}/man1/iptables-xml* +%{_mandir}/man8/xtables-legacy* +%ghost %{_sbindir}/ip{,6}tables{,-save,-restore} + +%files legacy-libs +%license COPYING +%{_libdir}/libip{4,6}tc.so.%{ipXtc_so_ver}* + +%files legacy-devel +%dir %{_includedir}/libiptc +%{_includedir}/libiptc/*.h +%{_libdir}/libip*tc.so +%{_libdir}/pkgconfig/libip{,4,6}tc.pc + +%files services + +# do_legacy_pkg +%else + +%files nft-services +%{_unitdir}/{arp,eb}tables.service +%{_libexecdir}/ebtables-helper +%config(noreplace) %{_sysconfdir}/sysconfig/ebtables-config +%ghost %{_sysconfdir}/sysconfig/arptables +%ghost %{_sysconfdir}/sysconfig/ebtables + +# do_legacy_pkg +%endif + +# the common files in services and nft-services +%dir %{script_path} +%{script_path}/ip{,6}tables.init +%config(noreplace) %{_sysconfdir}/sysconfig/ip{,6}tables{,-config} +%{_unitdir}/ip{,6}tables.service +%dir %{legacy_actions}/ip{,6}tables +%{legacy_actions}/ip{,6}tables/{save,panic} + +%files libs +%license COPYING +%{_libdir}/libxtables.so.12* +%dir %{_libdir}/xtables +%{_libdir}/xtables/lib{ip,ip6,x}t* +%{_mandir}/man8/ip{,6}tables.8.gz +%{_mandir}/man8/ip{,6}tables-{extensions,save,restore}.8.gz + +%files devel +%{_includedir}/xtables{,-version}.h +%{_libdir}/libxtables.so +%{_libdir}/pkgconfig/xtables.pc + +%files utils +%license COPYING +%{_sbindir}/nfnl_osf +%{_sbindir}/nfbpf_compile +%{_sbindir}/ip{,6}tables-apply +%dir %{_datadir}/xtables +%{_datadir}/xtables/pf.os +%{_mandir}/man8/nfnl_osf* +%{_mandir}/man8/nfbpf_compile* +%{_mandir}/man8/ip{,6}tables-apply* + +%files nft +%{_sbindir}/ip{,6}tables-nft* +%{_sbindir}/ip{,6}tables{,-restore}-translate +%{_sbindir}/{eb,arp}tables-nft* +%{_sbindir}/xtables-nft-multi +%{_sbindir}/xtables-monitor +%dir %{_libdir}/xtables +%{_libdir}/xtables/lib{arp,eb}t* +%{_libexecdir}/arptables-nft-helper +%{_mandir}/man8/xtables-monitor* +%{_mandir}/man8/xtables-translate* +%{_mandir}/man8/*-nft* +%{_mandir}/man8/ip{,6}tables{,-restore}-translate* +%ghost %{_sbindir}/ip{,6}tables{,-save,-restore} +%ghost %{_sbindir}/{eb,arp}tables{,-save,-restore} +%ghost %{_libexecdir}/arptables-helper +%ghost %{_mandir}/man8/arptables{,-save,-restore}.8.gz +%ghost %{_mandir}/man8/ebtables.8.gz + +%changelog +* Wed Dec 07 2022 Phil Sutter - 1.8.8-6 +- Add expected testsuite result + +* Tue Dec 06 2022 Phil Sutter - 1.8.8-5 +- nft: un-break among match with concatenation +- nft: fix ebtables among match when mac+ip addresses are used + +* Tue Jul 05 2022 Phil Sutter - 1.8.8-4 +- libxtables: Fix unsupported extension warning corner case + +* Wed Jun 08 2022 Phil Sutter - 1.8.8-3 +- arptables: Support -x/--exact flag + +* Thu Jun 02 2022 Phil Sutter - 1.8.8-2 +- tests: shell: Check overhead in iptables-save and -restore + +* Fri May 13 2022 Phil Sutter - 1.8.8-1 +- new version + +* Fri Mar 18 2022 Phil Sutter - 1.8.7-30 +- Use proto_to_name() from xshared in more places + +* Fri Mar 18 2022 Phil Sutter - 1.8.7-29 +- libxtables: Boost rule target checks by announcing chain names +- libxtables: Implement notargets hash table +- nft: Reject standard targets as chain names when restoring +- xshared: Merge and share parse_chain() +- xshared: Prefer xtables_chain_protos lookup over getprotoent +- nft: Speed up immediate parsing +- nft: Simplify immediate parsing + +* Wed Feb 16 2022 Phil Sutter - 1.8.7-28 +- extensions: SECMARK: Use a better context in test case + +* Fri Jan 28 2022 Phil Sutter - 1.8.7-27 +- extensions: SECMARK: Implement revision 1 + +* Mon Oct 11 2021 Phil Sutter - 1.8.7-26 +- tests/shell: Assert non-verbose mode is silent +- nft: Fix for non-verbose check command + +* Wed Oct 06 2021 Phil Sutter - 1.8.7-25 +- ebtables: Dump atomic waste +- doc: ebtables-nft.8: Adjust for missing atomic-options +- nft: Use xtables_malloc() in mnl_err_list_node_add() + +* Fri Oct 01 2021 Phil Sutter - 1.8.7-24 +- Add missing readlink required for iptables-nft(post) + +* Mon Aug 09 2021 Mohan Boddu - 1.8.7-23 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Thu Aug 05 2021 Phil Sutter - 1.8.7-22 +- nft-services must not depend on specific arch's build + +* Thu Aug 05 2021 Phil Sutter - 1.8.7-21 +- Build services sub-packages as noarch + +* Fri Jul 30 2021 Phil Sutter - 1.8.7-20 +- Make nft-services obsolete nft-compat to fix upgrade path + +* Thu Jul 29 2021 Phil Sutter - 1.8.7-19 +- Build iptables-services on C9S only +- Use systemd_ordering in nft-services, too +- Drop compat package, nft-services serves well for that purpose +- Make legacy unconditionally provide iptables, it's not built on RHEL + +* Wed Jul 28 2021 Phil Sutter - 1.8.7-18 +- Make iptables-nft-services require iptables-services to avoid confusion +- Add deprecation notice to iptables-extensions man page as well + +* Mon Jul 12 2021 Phil Sutter - 1.8.7-17 +- Provide a compat package to fix upgrade path from RHEL8 + +* Mon Jul 05 2021 Phil Sutter - 1.8.7-16 +- Review systemd unit file + +* Fri Jul 02 2021 Phil Sutter - 1.8.7-15 +- doc: Improve deprecation notices a bit +- nft: cache: Sort chains on demand only +- nft: Increase BATCH_PAGE_SIZE to support huge rulesets + +* Fri Jun 25 2021 Phil Sutter - 1.8.7-14 +- doc: Add deprecation notices to all relevant man pages + +* Wed Jun 16 2021 Phil Sutter - 1.8.7-13 +- extensions: sctp: Fix nftables translation +- nft: Fix bitwise expression avoidance detection +- iptables-nft: fix -Z option +- Do not build legacy sub-packages on RHEL + +* Thu Jun 10 2021 Phil Sutter - 1.8.7-12 +- arptables-nft-helper: Remove bashisms +- ebtables-helper: Drop unused variable, add a missing quote +- extensions: libxt_string: Avoid buffer size warning for strncpy() +- libxtables: Introduce xtables_strdup() and use it everywhere +- extensions: libebt_ip6: Use xtables_ip6parse_any() +- iptables-apply: Drop unused variable +- nft: Avoid buffer size warnings copying iface names +- nft: Avoid memleak in error path of nft_cmd_new() +- libxtables: Fix memleak in xtopt_parse_hostmask() +- extensions: libebt_ip6: Drop unused variables +- libxtables: Drop leftover variable in xtables_numeric_to_ip6addr() + +* Wed May 12 2021 Phil Sutter - 1.8.7-11 +- Fix License name in spec file +- Eliminate inet_aton() and inet_ntoa() +- nft-arp: Make use of ipv4_addr_to_string() +- Make legacy sub-packages obsolete older non-legacy ones +- Fix dates in changelog +- iptables.init: Fix functionality for iptables-nft +- iptables.init: Ignore sysctl files not suffixed '.conf' +- iptables.init: Drop unused NEW_MODUTILS check +- iptables.init: Drop some trailing whitespace + +* Fri Apr 23 2021 Phil Sutter - 1.8.7-10 +- Add provides to iptables-nft-services + +* Wed Apr 21 2021 Phil Sutter - 1.8.7-9 +- Add nft-services subpackage + +* Mon Apr 19 2021 Phil Sutter - 1.8.7-8 +- Drop hacks to maintain upgrade path + +* Fri Apr 16 2021 Mohan Boddu - 1.8.7-7 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Tue Mar 23 2021 Phil Sutter - 1.8.7-6 +- Restore alternatives configuration after upgrade +- Fix license location + +* Tue Mar 23 2021 Phil Sutter - 1.8.7-5 +- Fix upgrade path with package rename +- Add missing dependencies to iptables-nft package + +* Tue Feb 16 2021 Phil Sutter - 1.8.7-4 +- Drop bootstrap code again +- Drop workarounds for F24 and lower +- Fix iptables-utils summary +- Ship iptables-apply with iptables-utils +- Reduce files sections by use of globbing +- Ship common man pages with iptables-libs +- Ship *-translate man pages with iptables-nft +- Move legacy iptables binaries, libraries and headers into sub-packages +- Introduce compat sub-package to help with above transitions +- Drop libipulog header from devel package, this belongs to libnetfilter_log +- Do not ship internal headers in devel package + +* Thu Jan 28 2021 Phil Sutter - 1.8.7-3 +- ebtables: Exit gracefully on invalid table names + +* Tue Jan 26 2021 Fedora Release Engineering - 1.8.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Sat Jan 16 2021 Kevin Fenzi - 1.8.7-1 +- Update to 1.8.7. Fixes rhbz#1916948 + +* Thu Nov 19 2020 Tom Stellard - 1.8.6-5 +- Use make macros + +* Tue Nov 17 2020 Phil Sutter - 1.8.6-4 +- ebtables: Fix for broken chain renaming + +* Mon Nov 16 2020 Phil Sutter - 1.8.6-3 +- Drop obsolete StandardOutput setting from unit file +- Remove StandardError setting from unit file, its value is default + +* Thu Nov 5 2020 Florian Weimer - 1.8.6-2 +- Remove build dependency on autogen + +* Sat Oct 31 2020 Kevin Fenzi - 1.8.6-1 +- Update to 1.8.6. Fixes bug #1893453 + +* Tue Aug 25 2020 Phil Sutter - 1.8.5-3 +- nft: cache: Check consistency with NFT_CL_FAKE, too +- nft: Fix command name in ip6tables error message + +* Tue Jul 28 2020 Fedora Release Engineering - 1.8.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jun 23 2020 Phil Sutter - 1.8.5-1 +- Rebase onto upstream version 1.8.5 plus two late fixes +- Drop explicit iptables-apply installation, upstream fixed that +- Ship ip6tables-apply along with iptables package + +* Wed Feb 12 2020 Phil Sutter - 1.8.4-7 +- Move nft-specific extensions into iptables-nft package +- Move remaining extensions into iptables-libs package +- Make iptables-nft depend on iptables-libs instead of iptables +- Add upstream-suggested fixes + +* Wed Jan 29 2020 Fedora Release Engineering - 1.8.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Jan 15 2020 Phil Sutter - 1.8.4-5 +- Raise Alternatives priority of nft variants to match legacy ones +- Add Provides lines to allow for iptables-nft as full legacy alternative + +* Thu Dec 19 2019 Phil Sutter - 1.8.4-4 +- Drop leftover include in arptables-nft-helper + +* Fri Dec 13 2019 Phil Sutter - 1.8.4-3 +- Remove dependencies on initscripts package + +* Tue Dec 10 2019 Phil Sutter - 1.8.4-2 +- iptables-services requires /etc/init.d/functions + +* Wed Dec 04 2019 Phil Sutter - 1.8.4-1 +- New upstream version 1.8.4 + +* Thu Jul 25 2019 Fedora Release Engineering - 1.8.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Jun 25 2019 Björn Esser - 1.8.3-4 +- Disable bootstrapping + +* Tue Jun 25 2019 Phil Sutter - 1.8.3-3 +- Change URL to point at iptables project, not netfilter overview page +- Reuse URL value in tarball source +- Reduce globbing of library file names to expose future SONAME changes +- Add bootstrapping for libip*tc SONAME bump + +* Tue Jun 25 2019 Phil Sutter - 1.8.3-2 +- Install new man page for nfbpf_compile utility +- Move nfnl_osf man page to utils subpackage + +* Wed May 29 2019 Phil Sutter - 1.8.3-1 +- New upstream version 1.8.3 + +* Mon Apr 15 2019 Phil Sutter - 1.8.2-1 +- New upstream version 1.8.2 +- Integrate ebtables and arptables save/restore scripts with alternatives +- Add nft-specific ebtables and arptables man pages +- Move /etc/sysconfig/ip*tables-config files into services sub-package + +* Fri Feb 01 2019 Fedora Release Engineering - 1.8.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Jan 23 2019 Bogdan Dobrelya - 1.8.0-4 +- Use systemd_ordering macro + +* Fri Jul 13 2018 Fedora Release Engineering - 1.8.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jul 10 2018 Phil Sutter - 1.8.0-2 +- Fix calling ebtables-nft and arptables-nft via their new names. + +* Mon Jul 09 2018 Phil Sutter - 1.8.0-1 +- New upstream version 1.8.0. +- Replace ldconfig calls with newly introduced macros. +- Rename compat subpackage to iptables-nft to clarify its purpose. +- Make use of Alternatives system. + +* Fri May 04 2018 Phil Sutter - 1.6.2-3 +- Fix License: tag in spec-file +- Fix separation into compat subpackage + +* Thu Mar 01 2018 Phil Sutter - 1.6.2-2 +- Kill module unloading support +- Support /etc/sysctl.d +- Don't restart services after package update +- Add support for --wait options to restore commands + +* Wed Feb 21 2018 Michael Cronenworth - 1.6.2-1 +- New upstream version 1.6.2 + http://www.netfilter.org/projects/iptables/files/changes-iptables-1.6.2.txt + +* Wed Feb 07 2018 Fedora Release Engineering - 1.6.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sun Oct 22 2017 Kevin Fenzi - 1.6.1-5 +- Rebuild for new libnftnl + +* Wed Aug 02 2017 Fedora Release Engineering - 1.6.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.6.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 1.6.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 02 2017 Thomas Woerner - 1.6.1-1 +- New upstream version 1.6.1 with enhanced translation to nft support and + several fixes (RHBZ#1417323) + http://netfilter.org/projects/iptables/files/changes-iptables-1.6.1.txt +- Enable parallel build again + +* Thu Feb 02 2017 Petr Šabata - 1.6.0-4 +- Disabling parallel build to avoid build issues with xtables +- See http://patchwork.alpinelinux.org/patch/1787/ for reference +- This should be fixed in 1.6.1; parallel build can be restored after the + update + +* Mon Dec 19 2016 Thomas Woerner - 1.6.0-3 +- Dropped bad provides for iptables in services sub package (RHBZ#1327786) + +* Fri Jul 22 2016 Thomas Woerner - 1.6.0-2 +- /etc/ethertypes has been moved into the setup package for F-25+. + (RHBZ#1329256) + +* Wed Apr 13 2016 Thomas Woerner - 1.6.0-1 +- New upstream version 1.6.0 with nft-compat support and lots of fixes (RHBZ#1292990) + Upstream changelog: + http://netfilter.org/projects/iptables/files/changes-iptables-1.6.0.txt +- New libs sub package containing libxtables and unstable libip*tc libraries (RHBZ#1323161) +- Using scripts form RHEL-7 (RHBZ#1240366) +- New compat sub package for nftables compatibility +- Install iptables-apply (RHBZ#912047) +- Fixed module uninstall (RHBZ#1324101) +- Incorporated changes by Petr Pisar +- Enabled bpf compiler (RHBZ#1170227) Thanks to Yanko Kaneti for the patch + +* Thu Feb 04 2016 Fedora Release Engineering - 1.4.21-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 1.4.21-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon Dec 01 2014 Jiri Popelka - 1.4.21-14 +- add dhcpv6-client to /etc/sysconfig/ip6tables (RHBZ#1169036) + +* Mon Nov 03 2014 Jiri Popelka - 1.4.21-13 +- iptables.init: use /run/lock/subsys/ instead of /var/lock/subsys/ (RHBZ#1159573) + +* Mon Sep 29 2014 Jiri Popelka - 1.4.21-12 +- ip[6]tables.init: change shebang from /bin/sh to /bin/bash (RHBZ#1147272) + +* Sat Aug 16 2014 Fedora Release Engineering - 1.4.21-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jul 12 2014 Tom Callaway - 1.4.21-10 +- fix license handling + +* Sat Jun 07 2014 Fedora Release Engineering - 1.4.21-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed Mar 12 2014 Jiri Popelka - 1.4.21-8 +- add missing reload and panic actions +- BuildRequires: pkgconfig(x) instead of x-devel +- no need to specify file mode bits twice (in %%install and %%files) + +* Sun Jan 19 2014 Ville Skyttä - 1.4.21-7 +- Don't order services after syslog.target. + +* Wed Jan 15 2014 Thomas Woerner 1.4.21-6 +- Enable connlabel support again, needs libnetfilter_conntrack + +* Wed Jan 15 2014 Thomas Woerner 1.4.21-6 +- fixed update from RHEL-6 to RHEL-7 (RHBZ#1043901) + +* Tue Jan 14 2014 Jiri Popelka - 1.4.21-5 +- chmod /etc/sysconfig/ip[6]tables 755 -> 600 + +* Fri Jan 10 2014 Jiri Popelka - 1.4.21-4 +- drop virtual provide for xtables.so.9 +- add default /etc/sysconfig/ip[6]tables (RHBZ#1034494) + +* Thu Jan 09 2014 Jiri Popelka - 1.4.21-3 +- no need to support the pre-systemd things +- use systemd macros (#850166) +- remove scriptlets for migrating to a systemd unit from a SysV initscripts +- ./configure -> %%configure +- spec clean up +- fix self-obsoletion + +* Thu Jan 9 2014 Thomas Woerner 1.4.21-2 +- fixed system hang at shutdown if root device is network based (RHBZ#1007934) + Thanks to Rodrigo A B Freire for the patch + +* Thu Jan 9 2014 Thomas Woerner 1.4.21-1 +- no connlabel.conf upstream anymore +- new version 1.4.21 + - doc: clarify DEBUG usage macro + - iptables: use autoconf to process .in man pages + - extensions: libipt_ULOG: man page should mention NFLOG as replacement + - extensions: libxt_connlabel: use libnetfilter_conntrack + - Introduce a new revision for the set match with the counters support + - libxt_CT: Add the "NOTRACK" alias + - libip6t_mh: Correct command to list named mh types in manpage + - extensions: libxt_DNAT, libxt_REDIRECT, libxt_NETMAP, libxt_SNAT, libxt_MASQUERADE, libxt_LOG: rename IPv4 manpage and tell about IPv6 support + - extensions: libxt_LED: fix parsing of delay + - ip{6}tables-restore: fix breakage due to new locking approach + - libxt_recent: restore minimum value for --seconds + - iptables-xml: fix parameter parsing (similar to 2165f38) + - extensions: add copyright statements + - xtables: improve get_modprobe handling + - ip[6]tables: Add locking to prevent concurrent instances + - iptables: Fix connlabel.conf install location + - ip6tables: don't print out /128 + - libip6t_LOG: target output is different to libipt_LOG + - build: additional include path required after UAPI changes + - iptables: iptables-xml: Fix various parsing bugs + - libxt_recent: restore reap functionality to recent module + - build: fail in configure on missing dependency with --enable-bpf-compiler + - extensions: libxt_NFQUEUE: add --queue-cpu-fanout parameter + - extensions: libxt_set, libxt_SET: check the set family too + - ip6tables: Use consistent exit code for EAGAIN + - iptables: libxt_hashlimit.man: correct address + - iptables: libxt_conntrack.man extraneous commas + - iptables: libip(6)t_REJECT.man default icmp types + - iptables: iptables-xm1.1 correct man section + - iptables: libxt_recent.{c,man} dead URL + - iptables: libxt_string.man add examples + - extensions: libxt_LOG: use generic syslog reference in manpage + - iptables: extensions/GNUMakefile.in use CPPFLAGS + - iptables: correctly reference generated file + - ip[6]tables: fix incorrect alignment in commands_v_options + - build: add software version to manpage first line at configure stage + - extensions: libxt_cluster: add note on arptables-jf + - utils: nfsynproxy: fix error while compiling the BPF filter + - extensions: add SYNPROXY extension + - utils: add nfsynproxy tool + - iptables: state match incompatibilty across versions + - libxtables: xtables_ipmask_to_numeric incorrect with non-CIDR masks + - iptables: improve chain name validation + - iptables: spurious error in load_extension + - xtables: trivial spelling fix + +* Sun Dec 22 2013 Ville Skyttä - 1.4.19.1-2 +- Drop INSTALL from docs, escape macros in %%changelog. + +* Wed Jul 31 2013 Thomas Woerner 1.4.19.1-1 +- new version 1.4.19.1 + - libxt_NFQUEUE: fix bypass option documentation + - extensions: add connlabel match + - extensions: add connlabel match + - ip[6]tables: show --protocol instead of --proto in usage + - libxt_recent: Fix missing space in manpage for --mask option + - extensions: libxt_multiport: Update manpage to list valid protocols + - utils: nfnl_osf: use the right nfnetlink lib + - libip6t_NETMAP: Use xtables_ip6mask_to_cidr and get rid of libip6tc dependency + - Revert "build: resolve link failure for ip6t_NETMAP" + - libxt_osf: fix missing --ttl and --log in save output + - libxt_osf: fix bad location for location in --genre + - libip6t_SNPT: add manpage + - libip6t_DNPT: add manpage + - utils: updates .gitignore to include nfbpf_compile + - extensions: libxt_bpf: clarify --bytecode argument + - libxtables: fix parsing of dotted network mask format + - build: bump version to 1.4.19 + - libxt_conntrack: fix state match alias state parsing + - extensions: add libxt_bpf extension + - utils: nfbpf_compile + - doc: mention SNAT in INPUT chain since kernel 2.6.36 +- fixed changelog date weekdays where needed + +* Mon Mar 4 2013 Thomas Woerner 1.4.18-1 +- new version 1.4.18 + - lots of documentation changes + - Introduce match/target aliases + - Add the "state" alias to the "conntrack" match + - iptables: remove unused leftover definitions + - libxtables: add xtables_rule_matches_free + - libxtables: add xtables_print_num + - extensions: libip6t_DNPT: fix wording in DNPT target + - extension: libip6t_DNAT: allow port DNAT without address + - extensions: libip6t_DNAT: set IPv6 DNAT --to-destination + - extensions: S/DNPT: add missing save function +- changes of 1.4.17: + - libxt_time: add support to ignore day transition + - Convert the NAT targets to use the kernel supplied nf_nat.h header + - extensions: add IPv6 MASQUERADE extension + - extensions: add IPv6 SNAT extension + - extensions: add IPv6 DNAT target + - extensions: add IPv6 REDIRECT extension + - extensions: add IPv6 NETMAP extension + - extensions: add NPT extension + - extensions: libxt_statistic: Fix save output + +* Thu Feb 14 2013 Fedora Release Engineering - 1.4.16.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jan 16 2013 Ville Skyttä - 1.4.16.2-6 +- Own unowned -services libexec dirs (#894464, Michael Scherer). +- Fix -services unit file permissions (#732936, Michal Schmidt). + +* Thu Nov 8 2012 Thomas Woerner 1.4.16.2-5 +- fixed path of ip6tables.init in ip6tables.service + +* Fri Nov 2 2012 Thomas Woerner 1.4.16.2-4 +- fixed missing services for update of pre F-18 installations (rhbz#867960) + - provide and obsolete old main package in services sub package + - provide and obsolete old ipv6 sub package (pre F-17) in services sub package + +* Sun Oct 14 2012 Dan Horák 1.4.16.2-3 +- fix the compat provides for all 64-bit arches + +* Fri Oct 12 2012 Thomas Woerner 1.4.16.2-2 +- new sub package services providing the systemd services (RHBZ#862922) +- new sub package utils: provides nfnl_osf and the pf.os database +- using %%{_libexecdir}/iptables as script path for the original init scripts +- added service iptables save funcitonality using the new way provided by + initscripts 9.37.1 (RHBZ#748134) +- added virtual provide for libxtables.so.7 + +* Mon Oct 8 2012 Thomas Woerner 1.4.16.2-1 +- new version 1.4.16.2 + - build: support for automake-1.12 + - build: separate AC variable replacements from xtables.h + - build: have `make clean` remove dep files too + - doc: grammatical updates to libxt_SET + - doc: clean up interpunction in state list for xt_conntrack + - doc: deduplicate extension descriptions into a new manpage + - doc: trim "state" manpage and reference conntrack instead + - doc: have NOTRACK manpage point to CT instead + - doc: mention iptables-apply in the SEE ALSO sections + - extensions: libxt_addrtype: fix type in help message + - include: add missing linux/netfilter_ipv4/ip_queue.h + - iptables: fix wrong error messages + - iptables: support for match aliases + - iptables: support for target aliases + - iptables-restore: warn about -t in rule lines + - ip[6]tables-restore: cleanup to reduce one level of indentation + - libip6t_frag: match any frag id by default + - libxtables: consolidate preference logic + - libxt_devgroup: consolidate devgroup specification parsing + - libxt_devgroup: guard against negative numbers + - libxt_LED: guard against negative numbers + - libxt_NOTRACK: replace as an alias to CT --notrack + - libxt_state: replace as an alias to xt_conntrack + - libxt_tcp: print space before, not after "flags:" + - libxt_u32: do bounds checking for @'s operands + - libxt_*limit: avoid division by zero + - Merge branch 'master' of git://git.inai.de/iptables + - Merge remote-tracking branch 'nf/stable' + - New set match revision with --return-nomatch flag support +- dropped fixrestore patch, upstream + +* Wed Aug 1 2012 Thomas Woerner 1.4.15-1 +- new version 1.4.15 + - extensions: add HMARK target + - iptables-restore: fix parameter parsing (shows up with gcc-4.7) + - iptables-restore: move code to add_param_to_argv, cleanup (fix gcc-4.7) + - libxtables: add xtables_ip[6]mask_to_cidr + - libxt_devgroup: add man page snippet + - libxt_hashlimit: add support for byte-based operation + - libxt_recent: add --mask netmask + - libxt_recent: remove unused variable + - libxt_HMARK: correct a number of errors introduced by Pablo's rework + - libxt_HMARK: fix ct case example + - libxt_HMARK: fix output of iptables -L + - Revert "iptables-restore: move code to add_param_to_argv, cleanup (fix gcc-4.7)" + +* Wed Jul 18 2012 Thomas Woerner 1.4.14-3 +- added fixrestore patch submitted to upstream by fryasu (nfbz#774) + (RHBZ#825796) + +* Wed Jul 18 2012 Thomas Woerner 1.4.14-2 +- disabled libipq, removed upstream, not provided by kernel anymore + +* Wed Jul 18 2012 Thomas Woerner 1.4.14-1 +- new version 1.4.14 + - extensions: add IPv6 capable ECN match extension + - extensions: add nfacct match + - extensions: add rpfilter module + - extensions: libxt_rateest: output all options in save hook + - iptables: missing free() in function cache_add_entry() + - iptables: missing free() in function delete_entry() + - libiptc: fix retry path in TC_INIT + - libiptc: Returns the position the entry was inserted + - libipt_ULOG: fix --ulog-cprange + - libxt_CT: add --timeout option + - ip(6)tables-restore: make sure argv is NULL terminated + - Revert "libiptc: Returns the position the entry was inserted" + - src: mark newly opened fds as FD_CLOEXEC (close on exec) + - tests: add rateest match rules +- dropped patch5 (cloexec), merged upstream + +* Mon Apr 23 2012 Thomas Woerner 1.4.12.2-5 +- reenable iptables default services + +* Wed Feb 29 2012 Harald Hoyer 1.4.12.2-4 +- install everything in /usr + https://fedoraproject.org/wiki/Features/UsrMove + +* Thu Feb 16 2012 Thomas Woerner 1.4.12.2-3 +- fixed auto enable check for Fedora > 16 and added rhel > 6 check + +* Wed Feb 15 2012 Thomas Woerner 1.4.12.2-2 +- disabled autostart and auto enable for iptables.service and ip6tables.service + for Fedora > 16 + +* Mon Jan 16 2012 Thomas Woerner 1.4.12.2-1 +- new version 1.4.12.2 with new pkgconfig/libip4tc.pc and pkgconfig/libip6tc.pc + - build: make check stage not fail when building statically + - build: restore build order of modules + - build: scan for unreferenced symbols + - build: sort file list before build + - doc: clarification on the meaning of -p 0 + - doc: document iptables-restore's -T option + - doc: fix undesired newline in ip6tables-restore(8) + - ip6tables-restore: implement missing -T option + - iptables: move kernel version find routing into libxtables + - libiptc: provide separate pkgconfig files + - libipt_SAME: set PROTO_RANDOM on all ranges + - libxtables: Fix file descriptor leak in xtables_lmap_init on error + - libxt_connbytes: fix handling of --connbytes FROM + - libxt_CONNSECMARK: fix spacing in output + - libxt_conntrack: improve error message on parsing violation + - libxt_NFQUEUE: fix --queue-bypass ipt-save output + - libxt_RATEEST: link with -lm + - libxt_statistic: link with -lm + - Merge branch 'stable' + - Merge branch 'stable' of git://dev.medozas.de/iptables + - nfnl_osf: add missing libnfnetlink_CFLAGS to compile process + - xtoptions: fill in fallback value for nvals + - xtoptions: simplify xtables_parse_interface + +* Fri Jan 13 2012 Fedora Release Engineering - 1.4.12.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Dec 12 2011 Thomas Woerner 1.4.12.1-1 +- new version 1.4.12.1 with new pkgconfig/libipq.pc + - build: abort autogen on subcommand failure + - build: strengthen check for overlong lladdr components + - build: workaround broken linux-headers on RHEL-5 + - doc: clarify libxt_connlimit defaults + - doc: fix typo in libxt_TRACE + - extensions: use multi-target registration + - libip6t_dst: restore setting IP6T_OPTS_LEN flag + - libip6t_frag: restore inversion support + - libip6t_hbh: restore setting IP6T_OPTS_LEN flag + - libipq: add pkgconfig file + - libipt_ttl: document that negation is available + - libxt_conntrack: fix --ctproto 0 output + - libxt_conntrack: remove one misleading comment + - libxt_dccp: fix deprecated intrapositional ordering of ! + - libxt_dccp: fix random output of ! on --dccp-option + - libxt_dccp: provide man pages options in short help too + - libxt_dccp: restore missing XTOPT_INVERT tags for options + - libxt_dccp: spell out option name on save + - libxt_dscp: restore inversion support + - libxt_hashlimit: default htable-expire must be in milliseconds + - libxt_hashlimit: observe new default gc-expire time when saving + - libxt_hashlimit: remove inversion from hashlimit rev 0 + - libxt_owner: restore inversion support + - libxt_physdev: restore inversion support + - libxt_policy: remove superfluous inversion + - libxt_set: put differing variable names in directly + - libxt_set: update man page about kernel support on the feature + - libxt_string: define _GNU_SOURCE for strnlen + - libxt_string: escape the escaping char too + - libxt_string: fix space around arguments + - libxt_string: replace hex codes by char equivalents + - libxt_string: simplify hex output routine + - libxt_tcp: always print the mask parts + - libxt_TCPMSS: restore build with IPv6-less libcs + - libxt_TOS: update linux kernel version list for backported fix + - libxt_u32: fix missing allowance for inversion + - src: remove unused IPTABLES_MULTI define + - tests: add negation tests for libxt_statistic + - xtoptions: flag use of XTOPT_POINTER without XTOPT_PUT +- removed include/linux/types.h before build to be able to compile + +* Tue Jul 26 2011 Thomas Woerner 1.4.12-2 +- dropped temporary provide again + +* Tue Jul 26 2011 Thomas Woerner 1.4.12-1.1 +- added temporary provides for libxtables.so.6 to be able to rebuild iproute, + which is part of the standard build environment + +* Mon Jul 25 2011 Thomas Woerner 1.4.12-1 +- new version 1.4.12 with support of all new features of kernel 3.0 + - build: attempt to fix building under Linux 2.4 + - build: bump soversion for recent data structure change + - build: install modules in arch-dependent location + - doc: fix group range in libxt_NFLOG's man + - doc: fix version string in ip6tables.8 + - doc: include matches/targets in manpage again + - doc: mention multiple verbosity flags + - doc: the -m option cannot be inverted + - extensions: support for per-extension instance global variable space + - iptables-apply: select default rule file depending on call name + - iptables: consolidate target/match init call + - iptables: Coverity: DEADCODE + - iptables: Coverity: NEGATIVE_RETURNS + - iptables: Coverity: RESOURCE_LEAK + - iptables: Coverity: REVERSE_INULL + - iptables: Coverity: VARARGS + - iptables: restore negation for -f + - libip6t_HL: fix option names from ttl -> hl + - libipt_LOG: fix ignoring all but last flags + - libxtables: ignore whitespace in the multiaddress argument parser + - libxtables: properly reject empty hostnames + - libxtables: set clone's initial data to NULL + - libxt_conntrack: move more data into the xt_option_entry + - libxt_conntrack: restore network-byte order for v1,v2 + - libxt_hashlimit: use a more obvious expiry value by default + - libxt_rateest: abolish global variables + - libxt_RATEEST: abolish global variables + - libxt_RATEEST: fix userspacesize field + - libxt_RATEEST: use guided option parser + - libxt_state: fix regression about inversion of main option + - option: remove last traces of intrapositional negation +- complete changelog: + http://www.netfilter.org/projects/iptables/files/changes-iptables-1.4.12.txt + +* Thu Jul 21 2011 Thomas Woerner 1.4.11.1-4 +- merged ipv6 sub package into main package +- renamed init scripts to /usr/libexec/ip*tables.init + +* Fri Jul 15 2011 Thomas Woerner 1.4.11.1-3 +- added support for native systemd file (rhbz#694738) + - new iptables.service file + - additional requires + - moved sysv init scripts to /usr/libexec + - added new post, preun and postun scripts and triggers + +* Tue Jul 12 2011 Thomas Woerner 1.4.11.1-2 +- dropped temporary provide again +- enabled smp build + +* Tue Jul 12 2011 Thomas Woerner 1.4.11.1-1.1 +- added temporary provides for libxtables.so.5 to be able to rebuild iproute, + which is part of the standard build environment + +* Mon Jul 11 2011 Thomas Woerner 1.4.11.1-1 +- new version 1.4.11.1, bug and doc fix release for 1.4.11 + +* Tue Jun 7 2011 Thomas Woerner 1.4.11-1 +- new version 1.4.11 with all new features of 2.6.37-39 (not usable) + - lots of changes and bugfixes for base and extensions + - complete changelog: + http://www.netfilter.org/projects/iptables/files/changes-iptables-1.4.11.txt + +* Wed Feb 09 2011 Fedora Release Engineering - 1.4.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Jan 10 2011 Thomas Woerner 1.4.10-1 +- new version 1.4.10 with all new features of 2.6.36 + - all: consistent syntax use in struct option + - build: fix static linking + - doc: let man(1) autoalign the text in xt_cpu + - doc: remove extra empty line from xt_cpu + - doc: minimal spelling updates to xt_cpu + - doc: consistent use of markup + - extensions: libxt_quota: don't ignore the quota value on deletion + - extensions: REDIRECT: add random help + - extensions: add xt_cpu match + - extensions: add idletimer xt target extension + - extensions: libxt_IDLETIMER: use xtables_param_act when checking options + - extensions: libxt_CHECKSUM extension + - extensions: libipt_LOG/libip6t_LOG: support macdecode option + - extensions: fix compilation of the new CHECKSUM target + - extensions: libxt_ipvs: user-space lib for netfilter matcher xt_ipvs + - iptables-xml: resolve compiler warnings + - iptables: limit chain name length to be consistent with targets + - libiptc: add Libs.private to pkgconfig files + - libiptc: build with -Wl,--no-as-needed + - xtables: remove unnecessary cast +- dropped xt_CHECKSUM, added upstream + +* Tue Oct 12 2010 Thomas Woerner 1.4.9-2 +- added xt_CHECKSUM patch from Michael S. Tsirkin (rhbz#612587) + +* Wed Aug 4 2010 Thomas Woerner 1.4.9-1 +- new version 1.4.9 with all new features of 2.6.35 + - doc: xt_hashlimit: fix a typo + - doc: xt_LED: nroff formatting requirements + - doc: xt_string: correct copy-and-pasting in manpage + - extensions: add the LED target + - extensions: libxt_quota.c: Support option negation + - extensions: libxt_rateest: fix bps options for iptables-save + - extensions: libxt_rateest: fix typo in the man page + - extensions: REDIRECT: add random help + - includes: sync header files from Linux 2.6.35-rc1 + - libxt_conntrack: do print netmask + - libxt_hashlimit: always print burst value + - libxt_set: new revision added + - utils: add missing include flags to Makefile + - xtables: another try at chain name length checking + - xtables: remove xtables_set_revision function + - xt_quota: also document negation + - xt_sctp: Trace DATA chunk that supports SACK-IMMEDIATELY extension + - xt_sctp: support FORWARD_TSN chunk type + +* Fri Jul 2 2010 Thomas Woerner 1.4.8-1 +- new version 1.4.8 all new features of 2.6.34 (rhbz#) + - extensions: REDIRECT: fix --to-ports parser + - iptables: add noreturn attribute to exit_tryhelp() + - extensions: MASQUERADE: fix --to-ports parser + - libxt_comment: avoid use of IPv4-specific examples + - libxt_CT: add a manpage + - iptables: correctly check for too-long chain/target/match names + - doc: libxt_MARK: no longer restricted to mangle table + - doc: remove claim that TCPMSS is limited to mangle + - libxt_recent: add a missing space in output + - doc: add manpage for libxt_osf + - libxt_osf: import nfnl_osf program + - extensions: add support for xt_TEE + - CT: fix --ctevents parsing + - extensions: add CT extension + - libxt_CT: print conntrack zone in ->print/->save + - xtables: fix compilation when debugging is enabled + - libxt_conntrack: document --ctstate UNTRACKED + - iprange: fix xt_iprange v0 parsing + +* Wed Mar 24 2010 Thomas Woerner 1.4.7-2 +- added default values for IPTABLES_STATUS_VERBOSE and + IPTABLES_STATUS_LINENUMBERS in init script +- added missing lsb keywords Required-Start and Required-Stop to init script + +* Fri Mar 5 2010 Thomas Woerner 1.4.7-1 +- new version 1.4.7 with support for all new features of 2.6.33 (rhbz#570767) + - libip4tc: Add static qualifier to dump_entry() + - libipq: build as shared library + - recent: reorder cases in code (cosmetic cleanup) + - several man page and documentation fixes + - policy: fix error message showing wrong option + - includes: header updates + - Lift restrictions on interface names +- fixed license and moved iptables-xml into base package according to review + +* Wed Jan 27 2010 Thomas Woerner 1.4.6-2 +- moved libip*tc and libxtables libs to /lib[64], added symlinks for .so libs + to /usr/lib[64] for compatibility (rhbz#558796) + +* Wed Jan 13 2010 Thomas Woerner 1.4.6-1 +- new version 1.4.6 with support for all new features of 2.6.32 + - several man page fixes + - Support for nommu arches + - realm: remove static initializations + - libiptc: remove unused functions + - libiptc: avoid strict-aliasing warnings + - iprange: do accept non-ranges for xt_iprange v1 + - iprange: warn on reverse range + - iprange: roll address parsing into a loop + - iprange: do accept non-ranges for xt_iprange v1 (log) + - iprange: warn on reverse range (log) + - libiptc: fix wrong maptype of base chain counters on restore + - iptables: fix undersized deletion mask creation + - style: reduce indent in xtables_check_inverse + - libxtables: hand argv to xtables_check_inverse + - iptables/extensions: make bundled options work again + - CONNMARK: print mark rules with mask 0xffffffff as set instead of xset + - iptables: take masks into consideration for replace command + - doc: explain experienced --hitcount limit + - doc: name resolution clarification + - iptables: expose option to zero packet/byte counters for a specific rule + - build: restore --disable-ipv6 functionality on system w/o v6 headers + - MARK: print mark rules with mask 0xffffffff as --set-mark instead of --set-xmark + - DNAT: fix incorrect check during parsing + - extensions: add osf extension + - conntrack: fix --expires parsing + +* Thu Dec 17 2009 Thomas Woerner 1.4.5-2 +- dropped nf_ext_init remains from cloexec patch + +* Thu Sep 17 2009 Thomas Woerner 1.4.5-1 +- new version 1.4.5 with support for all new features of 2.6.31 + - libxt_NFQUEUE: add new v1 version with queue-balance option + - xt_conntrack: revision 2 for enlarged state_mask member + - libxt_helper: fix invalid passed option to check_inverse + - libiptc: split v4 and v6 + - extensions: collapse registration structures + - iptables: allow for parse-less extensions + - iptables: allow for help-less extensions + - extensions: remove empty help and parse functions + - xtables: add multi-registration functions + - extensions: collapse data variables to use multi-reg calls + - xtables: warn of missing version identifier in extensions + - multi binary: allow subcommand via argv[1] + - iptables: accept multiple IP address specifications for -s, -d + - several build fixes + - several man page fixes +- fixed two leaked file descriptors on sockets (rhbz#521397) + +* Mon Aug 24 2009 Thomas Woerner 1.4.4-1 +- new version 1.4.4 with support for all new features of 2.6.30 + - several man page fixes + - iptables: replace open-coded sizeof by ARRAY_SIZE + - libip6t_policy: remove redundant functions + - policy: use direct xt_policy_info instead of ipt/ip6t + - policy: merge ipv6 and ipv4 variant + - extensions: add `cluster' match support + - extensions: add const qualifiers in print/save functions + - extensions: use NFPROTO_UNSPEC for .family field + - extensions: remove redundant casts + - iptables: close open file descriptors + - fix segfault if incorrect protocol name is used + - replace open-coded sizeof by ARRAY_SIZE + - do not include v4-only modules in ip6tables manpage + - use direct xt_policy_info instead of ipt/ip6t + - xtables: fix segfault if incorrect protocol name is used + - libxt_connlimit: initialize v6_mask + - SNAT/DNAT: add support for persistent multi-range NAT mappings + +* Fri Jul 24 2009 Fedora Release Engineering - 1.4.3.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Apr 15 2009 Thomas Woerner 1.4.3.2-1 +- new version 1.4.3.2 +- also install iptables/internal.h, needed for iptables.h and ip6tables.h + +* Mon Mar 30 2009 Thomas Woerner 1.4.3.1-1 +- new version 1.4.3.1 + - libiptc is now shared + - supports all new features of the 2.6.29 kernel +- dropped typo_latter patch + +* Thu Mar 5 2009 Thomas Woerner 1.4.2-3 +- still more review fixes (rhbz#225906) + - consistent macro usage + - use sed instead of perl for rpath removal + - use standard RPM CFLAGS, but also -fno-strict-aliasing (needed for libiptc*) + +* Wed Feb 25 2009 Fedora Release Engineering - 1.4.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Fri Feb 20 2009 Thomas Woerner 1.4.2-1 +- new version 1.4.2 +- removed TOS value mask patch (upstream) +- more review fixes (rhbz#225906) +- install all header files (rhbz#462207) +- dropped nf_ext_init (rhbz#472548) + +* Tue Jul 22 2008 Thomas Woerner 1.4.1.1-2 +- fixed TOS value mask problem (rhbz#456244) (upstream patch) +- two more cloexec fixes + +* Tue Jul 1 2008 Thomas Woerner 1.4.1.1-1 +- upstream bug fix release 1.4.1.1 +- dropped extra patch for 1.4.1 - not needed anymore + +* Tue Jun 10 2008 Thomas Woerner 1.4.1-1 +- new version 1.4.1 with new build environment +- additional ipv6 network mask patch from Jan Engelhardt +- spec file cleanup +- removed old patches + +* Fri Jun 6 2008 Tom "spot" Callaway 1.4.0-5 +- use normal kernel headers, not linux/compiler.h +- change BuildRequires: kernel-devel to kernel-headers +- We need to do this to be able to build for both sparcv9 and sparc64 + (there is no kernel-devel.sparcv9) + +* Thu Mar 20 2008 Thomas Woerner 1.4.0-4 +- use O_CLOEXEC for all opened files in all applications (rhbz#438189) + +* Mon Mar 3 2008 Thomas Woerner 1.4.0-3 +- use the kernel headers from the build tree for iptables for now to be able to + compile this package, but this makes the package more kernel dependant +- use s6_addr32 instead of in6_u.u6_addr32 + +* Wed Feb 20 2008 Fedora Release Engineering - 1.4.0-2 +- Autorebuild for GCC 4.3 + +* Mon Feb 11 2008 Thomas Woerner 1.4.0-1 +- new version 1.4.0 +- fixed condrestart (rhbz#428148) +- report the module in rmmod_r if there is an error +- use nf_ext_init instead of my_init for extension constructors + +* Mon Nov 5 2007 Thomas Woerner 1.3.8-6 +- fixed leaked file descriptor before fork/exec (rhbz#312191) +- blacklisting is not working, use "install X /bin/(true|false)" test instead +- return private exit code 150 for disabled ipv6 support +- use script name for output messages + +* Tue Oct 16 2007 Thomas Woerner 1.3.8-5 +- fixed error code for stopping a already stopped firewall (rhbz#321751) +- moved blacklist test into start + +* Wed Sep 26 2007 Thomas Woerner 1.3.8-4.1 +- do not start ip6tables if ipv6 is blacklisted (rhbz#236888) +- use simpler fix for (rhbz#295611) + Thanks to Linus Torvalds for the patch. + +* Mon Sep 24 2007 Thomas Woerner 1.3.8-4 +- fixed IPv6 reject type (rhbz#295181) +- fixed init script: start, stop and status +- support netfilter compiled into kernel in init script (rhbz#295611) +- dropped inversion for limit modules from man pages (rhbz#220780) +- fixed typo in ip6tables man page (rhbz#236185) + +* Wed Sep 19 2007 Thomas Woerner 1.3.8-3 +- do not depend on local_fs in lsb header - this delayes start after network +- fixed exit code for initscript usage + +* Mon Sep 17 2007 Thomas Woerner 1.3.8-2.1 +- do not use lock file for condrestart test + +* Thu Aug 23 2007 Thomas Woerner 1.3.8-2 +- fixed initscript for LSB conformance (rhbz#246953, rhbz#242459) +- provide iptc interface again, but unsupported (rhbz#216733) +- compile all extension, which are supported by the kernel-headers package +- review fixes (rhbz#225906) + +* Tue Jul 31 2007 Thomas Woerner +- reverted ipv6 fix, because it disables the ipv6 at all (rhbz#236888) + +* Fri Jul 13 2007 Steve Conklin - 1.3.8-1 +- New version 1.3.8 + +* Mon Apr 23 2007 Jeremy Katz - 1.3.7-2 +- fix error when ipv6 support isn't loaded in the kernel (#236888) + +* Wed Jan 10 2007 Thomas Woerner 1.3.7-1.1 +- fixed installation of secmark modules + +* Tue Jan 9 2007 Thomas Woerner 1.3.7-1 +- new verison 1.3.7 +- iptc is not a public interface and therefore not installed anymore +- dropped upstream secmark patch + +* Tue Sep 19 2006 Thomas Woerner 1.3.5-2 +- added secmark iptables patches (#201573) + +* Wed Jul 12 2006 Jesse Keating - 1.3.5-1.2.1 +- rebuild + +* Fri Feb 10 2006 Jesse Keating - 1.3.5-1.2 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 1.3.5-1.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Thu Feb 2 2006 Thomas Woerner 1.3.5-1 +- new version 1.3.5 +- fixed init script to set policy for raw tables, too (#179094) + +* Tue Jan 24 2006 Thomas Woerner 1.3.4-3 +- added important iptables header files to devel package + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Fri Nov 25 2005 Thomas Woerner 1.3.4-2 +- fix for plugin problem: link with "gcc -shared" instead of "ld -shared" and + replace "_init" with "__attribute((constructor)) my_init" + +* Fri Nov 25 2005 Thomas Woerner 1.3.4-1.1 +- rebuild due to unresolved symbols in shared libraries + +* Fri Nov 18 2005 Thomas Woerner 1.3.4-1 +- new version 1.3.4 +- dropped free_opts patch (upstream fixed) +- made libipq PIC (#158623) +- additional configuration options for iptables startup script (#172929) + Thanks to Jan Gruenwald for the patch +- spec file cleanup (dropped linux_header define and usage) + +* Mon Jul 18 2005 Thomas Woerner 1.3.2-1 +- new version 1.3.2 with additional patch for the misplaced free_opts call + from Marcus Sundberg + +* Wed May 11 2005 Thomas Woerner 1.3.1-1 +- new version 1.3.1 + +* Fri Mar 18 2005 Thomas Woerner 1.3.0-2 +- Remove unnecessary explicit kernel dep (#146142) +- Fixed out of bounds accesses (#131848): Thanks to Steve Grubb + for the patch +- Adapted iptables-config to reference to modprobe.conf (#150143) +- Remove misleading message (#140154): Thanks to Ulrich Drepper + for the patch + +* Mon Feb 21 2005 Thomas Woerner 1.3.0-1 +- new version 1.3.0 + +* Thu Nov 11 2004 Thomas Woerner 1.2.11-3.2 +- fixed autoload problem in iptables and ip6tables (CAN-2004-0986) + +* Fri Sep 17 2004 Thomas Woerner 1.2.11-3.1 +- changed default behaviour for IPTABLES_STATUS_NUMERIC to "yes" (#129731) +- modified config file to match this change and un-commented variables with + default values + +* Thu Sep 16 2004 Thomas Woerner 1.2.11-3 +- applied second part of cleanup patch from (#131848): thanks to Steve Grubb + for the patch + +* Wed Aug 25 2004 Thomas Woerner 1.2.11-2 +- fixed free bug in iptables (#128322) + +* Tue Jun 22 2004 Thomas Woerner 1.2.11-1 +- new version 1.2.11 + +* Thu Jun 17 2004 Thomas Woerner 1.2.10-1 +- new version 1.2.10 + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Tue Mar 02 2004 Elliot Lee +- rebuilt + +* Thu Feb 26 2004 Thomas Woerner 1.2.9-2.3 +- fixed iptables-restore -c fault if there are no counters (#116421) + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Sun Jan 25 2004 Dan Walsh 1.2.9-1.2 +- Close File descriptors to prevent SELinux error message + +* Wed Jan 7 2004 Thomas Woerner 1.2.9-1.1 +- rebuild + +* Wed Dec 17 2003 Thomas Woerner 1.2.9-1 +- vew version 1.2.9 +- new config options in ipXtables-config: + IPTABLES_MODULES_UNLOAD +- more documentation in ipXtables-config +- fix for netlink security issue in libipq (devel package) +- print fix for libipt_icmp (#109546) + +* Thu Oct 23 2003 Thomas Woerner 1.2.8-13 +- marked all messages in iptables init script for translation (#107462) +- enabled devel package (#105884, #106101) +- bumped build for fedora for libipt_recent.so (#106002) + +* Tue Sep 23 2003 Thomas Woerner 1.2.8-12.1 +- fixed lost udp port range in ip6tables-save (#104484) +- fixed non numeric multiport port output in ipXtables-savs + +* Mon Sep 22 2003 Florian La Roche 1.2.8-11 +- do not link against -lnsl + +* Wed Sep 17 2003 Thomas Woerner 1.2.8-10 +- made variables in rmmod_r local + +* Tue Jul 22 2003 Thomas Woerner 1.2.8-9 +- fixed permission for init script + +* Sat Jul 19 2003 Thomas Woerner 1.2.8-8 +- fixed save when iptables file is missing and iptables-config permissions + +* Tue Jul 8 2003 Thomas Woerner 1.2.8-7 +- fixes for ip6tables: module unloading, setting policy only for existing + tables + +* Thu Jul 3 2003 Thomas Woerner 1.2.8-6 +- IPTABLES_SAVE_COUNTER defaults to no, now +- install config file in /etc/sysconfig +- exchange unload of ip_tables and ip_conntrack +- fixed start function + +* Wed Jul 2 2003 Thomas Woerner 1.2.8-5 +- new config option IPTABLES_SAVE_ON_RESTART +- init script: new status, save and restart +- fixes #44905, #65389, #80785, #82860, #91040, #91560 and #91374 + +* Mon Jun 30 2003 Thomas Woerner 1.2.8-4 +- new config option IPTABLES_STATUS_NUMERIC +- cleared IPTABLES_MODULES in iptables-config + +* Mon Jun 30 2003 Thomas Woerner 1.2.8-3 +- new init scripts + +* Sat Jun 28 2003 Florian La Roche +- remove check for very old kernel versions in init scripts +- sync up both init scripts and remove some further ugly things +- add some docu into rpm + +* Thu Jun 26 2003 Thomas Woerner 1.2.8-2 +- rebuild + +* Mon Jun 16 2003 Thomas Woerner 1.2.8-1 +- update to 1.2.8 + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Mon Jan 13 2003 Bill Nottingham 1.2.7a-1 +- update to 1.2.7a +- add a plethora of bugfixes courtesy Michael Schwendt + +* Fri Dec 13 2002 Elliot Lee 1.2.6a-3 +- Fix multilib + +* Wed Aug 07 2002 Karsten Hopp +- fixed iptables and ip6tables initscript output, based on #70511 +- check return status of all iptables calls, not just the last one + in a 'for' loop. + +* Mon Jul 29 2002 Bernhard Rosenkraenzer 1.2.6a-1 +- 1.2.6a (bugfix release, #69747) + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Mon Mar 4 2002 Bernhard Rosenkraenzer 1.2.5-3 +- Add some fixes from CVS, fixing bug #60465 + +* Tue Feb 12 2002 Bernhard Rosenkraenzer 1.2.5-2 +- Merge ip6tables improvements from Ian Prowell + #59402 +- Update URL (#59354) +- Use /sbin/chkconfig rather than chkconfig in %%postun script + +* Fri Jan 11 2002 Bernhard Rosenkraenzer 1.2.5-1 +- 1.2.5 + +* Wed Jan 09 2002 Tim Powers +- automated rebuild + +* Mon Nov 5 2001 Bernhard Rosenkraenzer 1.2.4-2 +- Fix %%preun script + +* Tue Oct 30 2001 Bernhard Rosenkraenzer 1.2.4-1 +- Update to 1.2.4 (various fixes, including security fixes; among others: + #42990, #50500, #53325, #54280) +- Fix init script (#31133) + +* Mon Sep 3 2001 Bernhard Rosenkraenzer 1.2.3-1 +- 1.2.3 (5 security fixes, some other fixes) +- Fix updating (#53032) + +* Mon Aug 27 2001 Bernhard Rosenkraenzer 1.2.2-4 +- Fix #50990 +- Add some fixes from current CVS; should fix #52620 + +* Mon Jul 16 2001 Bernhard Rosenkraenzer 1.2.2-3 +- Add some fixes from the current CVS tree; fixes #49154 and some IPv6 + issues + +* Tue Jun 26 2001 Bernhard Rosenkraenzer 1.2.2-2 +- Fix iptables-save reject-with (#45632), Patch from Michael Schwendt + + +* Tue May 8 2001 Bernhard Rosenkraenzer 1.2.2-1 +- 1.2.2 + +* Wed Mar 21 2001 Bernhard Rosenkraenzer +- 1.2.1a, fixes #28412, #31136, #31460, #31133 + +* Thu Mar 1 2001 Bernhard Rosenkraenzer +- Yet another initscript fix (#30173) +- Fix the fixes; they fixed some issues but broke more important + stuff :/ (#30176) + +* Tue Feb 27 2001 Bernhard Rosenkraenzer +- Fix up initscript (#27962) +- Add fixes from CVS to iptables-{restore,save}, fixing #28412 + +* Fri Feb 09 2001 Karsten Hopp +- create /etc/sysconfig/iptables mode 600 (same problem as #24245) + +* Mon Feb 05 2001 Karsten Hopp +- fix bugzilla #25986 (initscript not marked as config file) +- fix bugzilla #25962 (iptables-restore) +- mv chkconfig --del from postun to preun + +* Thu Feb 1 2001 Trond Eivind Glomsrød +- Fix check for ipchains + +* Mon Jan 29 2001 Bernhard Rosenkraenzer +- Some fixes to init scripts + +* Wed Jan 24 2001 Bernhard Rosenkraenzer +- Add some fixes from CVS, fixes among other things Bug #24732 + +* Wed Jan 17 2001 Bernhard Rosenkraenzer +- Add missing man pages, fix up init script (Bug #17676) + +* Mon Jan 15 2001 Bill Nottingham +- add init script + +* Mon Jan 15 2001 Bernhard Rosenkraenzer +- 1.2 +- fix up ipv6 split +- add init script +- Move the plugins from /usr/lib/iptables to /lib/iptables. + This needs to work before /usr is mounted... +- Use -O1 on alpha (compiler bug) + +* Sat Jan 6 2001 Bernhard Rosenkraenzer +- 1.1.2 +- Add IPv6 support (in separate package) + +* Thu Aug 17 2000 Bill Nottingham +- build everywhere + +* Tue Jul 25 2000 Bernhard Rosenkraenzer +- 1.1.1 + +* Thu Jul 13 2000 Prospector +- automatic rebuild + +* Tue Jun 27 2000 Preston Brown +- move iptables to /sbin. +- excludearch alpha for now, not building there because of compiler bug(?) + +* Fri Jun 9 2000 Bill Nottingham +- don't obsolete ipchains either +- update to 1.1.0 + +* Sun Jun 4 2000 Bill Nottingham +- remove explicit kernel requirement + +* Tue May 2 2000 Bernhard Rosenkränzer +- initial package