Commit Graph

942 Commits

Author SHA1 Message Date
Grzegorz Kuczyński
19a4359368 xt_condition: add support for namespaces 2017-06-15 10:45:37 +02:00
Jan Engelhardt
1b379667d3 xt_psd: resolve compiler warning
xt_psd.c:53:0: warning: "HASH_SIZE" redefined
 #define HASH_SIZE   (1 << HASH_LOG)
linux-4.10.10/include/linux/hashtable.h:26:0:
note: this is the location of the previous definition
 #define HASH_SIZE(name) (ARRAY_SIZE(name))
2017-04-13 11:38:00 +02:00
Jan Engelhardt
cd410aefe7 Xtables-addons 2.12 v2.12 2017-01-11 01:39:53 +01:00
Jan Engelhardt
e4b5cef8f0 build: mark Linux 4.10 as supported 2017-01-04 02:44:43 +01:00
Ralph Sennhauser
a8af97b8fa build: support for Linux 4.10
Commit 613dbd95723aee7abd16860745691b6c7bda20dc (netfilter:
x_tables: move hook state into xt_action_param structure) changes the
struct xt_action_param, accommodate for it.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2017-01-04 02:40:41 +01:00
Ralph Sennhauser
db234c30cd build: support for Linux 4.9
Commit f330a7fdbe1611104622faff7e614a246a7d20f0 (netfilter: conntrack:
get rid of conntrack timer) replaces timer_list with an u32, use helper
from commit c8607e020014cf11a61601a0005270bad81cabdf (netfilter: nft_ct:
fix expiration getter).

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2017-01-04 02:04:14 +01:00
Jan Engelhardt
2e6fb73e85 Xtables-addons 2.11 v2.11 2016-05-20 14:35:46 +02:00
Jan Engelhardt
6024758b28 xt_ECHO: ensure IP header length is set 2016-05-20 10:48:27 +02:00
Jan Engelhardt
69f3f21a32 xt_ECHO: handle fragments
Since everything is just echoed back verbatim without modification,
supporting fragments seems easy.
2016-05-20 10:48:00 +02:00
Your Name
7af1b9737c xt_pknock: use shash crypto API
The old hash API is dropped as of Linux 4.6.
Only build tested.
2016-05-20 04:46:31 -04:00
Jan Engelhardt
f5e95f35a7 xt_pknock: replace nemesis by socat
Use a utility much more widely available.
2016-04-22 22:51:24 +02:00
Jan Engelhardt
80bed0655f xt_pknock: import digest generation utility 2016-04-22 22:48:56 +02:00
Jan Engelhardt
bc6aaf74d8 xt_pknock: remove reference to non-existing documentation
Even in the old pknock-0.5.tar.gz tarball, there is no doc/pknock/
directory.
2016-04-22 22:43:17 +02:00
Jan Engelhardt
192243483a xt_SYSRQ: use new shash crypto API
The "shash" API is not exactly new (Linux 2.6.27), but the "hash" API
was finally thrown out for Linux 4.6.
2016-04-22 11:11:57 +02:00
Andreas Schultz
e3114d60d5 xt_ACCOUNT: make it namespace aware
xt_ACCOUNTing objects create in one network namespace could be
read from all namespaces. Also object with the same name in
different namespaces would collide.

Signed-off-by: Andreas Schultz <aschultz@tpip.net>
2016-04-05 13:30:57 +02:00
Matthias Schiffer
e6f20befad build: fix configure compatiblity with POSIX shells
The kernel version detection code uses some bashisms, which makes the
build fail on Debian systems where /bin/sh links to dash. Replace with
POSIX-conforming commands at the cost of requiring awk.
2016-04-05 12:25:13 +02:00
Jan Engelhardt
5038e160f8 Xtables-addons 2.10 v2.10 2015-11-20 23:30:33 +01:00
Jan Engelhardt
a6289ec3ff build: silence compiler warning in xt_quota2
xt_quota2.c:67:6: warning: unused variable "ret" [-Wunused-variable]
2015-11-20 23:17:40 +01:00
Jan Engelhardt
01e7128a80 build: support for Linux 4.4 2015-11-20 23:17:39 +01:00
Jan Engelhardt
1dc2a1c2de xt_ACCOUNT: remove redundant braces
For single-line statements, the {} are not strictly needed.
2015-11-09 22:33:49 +01:00
Jan Engelhardt
60b6b1dbef xt_ACCOUNT: indent reduction
Invert early terminating conditions so the rest of the block can be
de-indented.
2015-11-09 22:33:49 +01:00
Jan Engelhardt
fcb19403bc xt_ACCOUNT: call free_pages(x,2) (doc)
Below is the patch with the *rest* of the free_page(X) calls changed
to free_pages(X, 2). xt_ACCOUNT should always allocate memory in page
pairs. And always *free* memory in page pairs.

References: http://www.spinics.net/lists/netfilter-devel/msg39025.html
2015-11-09 22:33:47 +01:00
Neil P. Murphy
f89f10bbe9 xt_ACCOUNT: call free_pages(x,2)
Below is the patch with the *rest* of the free_page(X) calls changed
to free_pages(X, 2). xt_ACCOUNT should always allocate memory in page
pairs. And always *free* memory in page pairs.

References: http://www.spinics.net/lists/netfilter-devel/msg39025.html
2015-11-09 22:25:16 +01:00
Jan Engelhardt
a9358542fe Xtables-addons 2.9 v2.9 2015-10-12 16:27:59 +02:00
Jan Engelhardt
237fe7c660 build: support for Linux 4.3 2015-10-12 16:27:08 +02:00
Sam Liddicott
939fc901c1 xt_quota2: allow incremental value to be written to quota proc file
As well as writing absolute numeric values to the quota file, you
can now also write numbers preceded by a + sign or a - sign, e.g.

* "+30" would increase the quota by 30
* "+-20" would increase the quota by negative 20,
  which is the same as decrease by 20
* "-5" would decrease the quota by 5
2015-09-29 20:54:18 +02:00
Boris Figovsky
a4a077ff86 xt_DHCPMAC: correct L2addr set and compare 2015-09-29 20:40:24 +02:00
Jan Engelhardt
bccf64d820 Xtables-addons 2.8 v2.8 2015-08-19 12:38:49 +02:00
Jan Engelhardt
7e3e156d92 xt_ECHO: enable for all supported versions
Linux is now at 4.x.
2015-08-19 12:36:18 +02:00
Tim Gardner
8f70b9a99d build: support for Linux 4.2
xt_DNETMAP.c: In function "dnetmap_prefix_destroy":
xt_DNETMAP.c:185:2: error: implicit declaration of function
"remove_proc_entry" [-Werror=implicit-function-declaration]
  remove_proc_entry(p->proc_str_data, dnetmap_net->xt_dnetmap);
2015-08-19 12:35:01 +02:00
Jan Engelhardt
e277360bcd Xtables-addons 2.7 v2.7 2015-07-06 05:59:21 +02:00
Jan Engelhardt
672f12b2a6 doc: remove old changelog entries 2015-07-06 05:59:21 +02:00
Jan Engelhardt
8788b6c096 doc: combine kernel version numbers 2015-07-06 05:59:21 +02:00
Alexander Petrenas
96ce5ec488 xt_TARPIT: support for Linux 4.1 2015-07-06 05:59:21 +02:00
Jan Engelhardt
5e22c9c592 xt_ACCOUNT: avoid implicit padding in struct ipt_acc_handle_ip
Make the structure size so that an ILP32 environment has no problem
taking the raw bytes from an LP64 one.
2015-06-05 13:52:45 +02:00
Jan Engelhardt
01f97bfdd1 iptaccount: cast from uint64_t to please printf
%llu wants an "unsigned long long", which is not necessarily
the same as uint64_t.
2015-06-05 13:51:56 +02:00
Neal P. Murphy
1324442bce xt_ACCOUNT: make counters 64-bit wide
The Smoothwall Express traffic stats collector (traffiClogger) does
not handle counter rollovers well and does not perform read&flush.
(Yes, the code is somewhat aged.) To change it to perform read&flush
is non-trivial. Then, it occurred to me that it might be easier to
change ipt_ACCOUNT in xtables-addons to use 64-bit counters,
considering it was designed around single kernel pages.

The following submission counts to at least 100 GB, produces no
obvious kernel gripes, and adjacent counters do not seem to interfere
with each other. Yes, it uses more memory, but RAM costs much less
than bugs that grown out of complex software.

The theory:

  - Use two kernel pages for the counters for each group of 256
    addresses.
  - Change counters to 64-bit.
  - Change to __get_free_pages/free_pages, using order=2
    (two consecutive pages), and zero both pages.
  - Change "%u" to "%llu" as needed.
  - Everything else pretty much stays the same.

I also changed tmpbuf to two pages (Justin Case's idea), but I
do not know if that's really necessary.
2015-06-05 13:51:55 +02:00
Jan Engelhardt
a576f4d43e Xtables-addons 2.6 v2.6 2014-09-29 10:33:13 +02:00
Jan Engelhardt
cc17e1d0fe build: explicitly support Linux 3.16, 3.17 2014-09-04 18:50:35 +02:00
Adam Butcher
c08835d65c xt_pknock: fix pknock in UDP SPA mode
When the PK_CRYPTO pre-processor flag got removed in
v1.47.1-2-g66f213e, one of the removal cases was misapplied; the body
of an "#ifndef PK_CRYPTO" was left in rather than the whole section
being removed.
2014-09-04 18:45:42 +02:00
Adam Butcher
4c21811919 src: work with typeof
Although not officially supported, we have found that the
xtables-addons modules we are interested in work fine on 3.0.4 with a
slight non-invasive mod to compat_xtables.h.
2014-09-04 18:44:52 +02:00
Jan Engelhardt
431062c6ec Xtables-addons 2.5 v2.5 2014-04-18 19:14:59 +02:00
Jan Engelhardt
87adf3461f build: resolve compile error with Linux 3.15
Commit v3.15-rc1~141^2~97 changed the signature for cn_netlink_send.
2014-04-18 19:12:51 +02:00
Jan Engelhardt
f2e21e67a5 build: resolve compile error with Linux 3.13
net_random has been removed in commit v3.14-rc1~94^2~191 and replaced
by its definition, prandom_u32.

prandom_u32 was only introduced in v3.8-rc1~74^2~22, so we will have
an extra ifdef for 3.7 support.
2014-04-18 19:12:40 +02:00
Daniel Golle
ae307c0bf3 xt_quota2: introduce support for network namespaces
Initialize a separate xt_quota2 instance for each network
namespace so data limit can be set and enforced per container.
2014-04-18 15:10:05 +02:00
Jan Engelhardt
ec8c6b8732 doc: add xt_quota2 changelog items 2014-01-18 12:29:09 +01:00
Jan Engelhardt
7916b74a42 Xtables-addons 2.4 v2.4 2014-01-09 10:37:52 +01:00
Jan Engelhardt
7fbbd0401e build: support for Linux 3.13 2014-01-09 10:25:40 +01:00
Jan Engelhardt
991c0cf4cf compat_xtables: remove no longer needed target API redirection
Function signature for targets stayed the same since 3.7.
2014-01-09 10:24:32 +01:00
Jan Engelhardt
b58e78968e compat_xtables: remove unused compat_nfinetaddr.h header 2014-01-09 10:19:48 +01:00