Commit Graph

918 Commits

Author SHA1 Message Date
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
Jan Engelhardt
02eb0e5df9 compat_xtables: remove unused function declarations 2014-01-09 10:19:00 +01:00
Jan Engelhardt
98ea6c538b compat_xtables: remove unused ipt_unregister_table macro 2014-01-09 10:16:42 +01:00
Jan Engelhardt
7cf7250e07 compat_xtables: remove unused xtnu_ip_route_me_harder 2014-01-09 10:16:02 +01:00
Jan Engelhardt
f9b0ee7533 compat_xtables: remove unused xtnu_skb_make_writable 2014-01-09 10:14:36 +01:00
Jan Engelhardt
a82d0ba517 compat_xtables: remove unused xtnu_request_find_match
The xt_find_match function is also getting unexported in 3.14.
2014-01-09 10:09:04 +01:00
Sam Liddicott
bc2bcc383c xt_quota2: remove trailing junk which might have a digit in it
Signed-off-by: Sam Liddicott <sam@liddicott.com>
2014-01-09 10:00:43 +01:00
Sam Liddicott
c6c70ab30b xt_quota2: fix 2 bugs when not in grow mode
1. XT_QUOTA_NO_CHANGE should not alter quota to zero ever
2. XT_QUOTA_PACKET should not be set to zero based on skb->len

Signed-off-by: Sam Liddicott <sam@liddicott.com>
2014-01-09 09:59:04 +01:00
Jan Engelhardt
a0a8fbc091 Update .gitignore
Looks like GCOV is enabled somewhere.
2014-01-09 09:58:08 +01:00
Jan Engelhardt
9414a5df34 extensions: remove RAWSNAT/RAWDNAT 2013-08-07 15:42:56 +02:00
Jan Engelhardt
f28cfff138 extensions: remove STEAL target
There is enough demo code in the "demos" branch.
2013-08-07 15:40:24 +02:00
Jan Engelhardt
a8d7ec5ad6 build: skip calling depmod
Calling depmod is no longer needed. (Since sometime in the 2.6
series.)
2013-06-19 06:09:34 +02:00
Jan Engelhardt
29f293743a Xtables-addons 2.3 v2.3 2013-06-18 08:09:18 +02:00
Jan Engelhardt
3bf7ebc48c xt_pknock: support for Linux 3.10 2013-06-18 08:09:18 +02:00
Jan Engelhardt
172bc7e306 xt_quota2: support for Linux 3.10 2013-06-18 08:09:18 +02:00
Jan Engelhardt
db45bbcb9e xt_condition: support for Linux 3.10 2013-06-18 08:09:18 +02:00
Jan Engelhardt
b2cd0ab65b xt_DNETMAP: support for Linux 3.10 2013-06-18 08:09:16 +02:00
Jan Engelhardt
b5a2f9aa14 compat_xtables: dissolve unusued rt_dst 2013-06-08 15:27:34 +02:00
Jan Engelhardt
6fbb35d686 extensions: resolve compile error when CONFIG_UIDGID_STRICT_TYPE_CHECKS=y
xt_DNETMAP.c: In function "dnetmap_tg_check":
xt_DNETMAP.c:331:16: error: incompatible types when assigning to
type "kuid_t" from type "unsigned int"
xt_DNETMAP.c:332:16: error: incompatible types when assigning to
type "kgid_t" from type "unsigned int"
xt_DNETMAP.c:344:16: error: incompatible types when assigning to
type "kuid_t" from type "unsigned int"
xt_DNETMAP.c:345:16: error: incompatible types when assigning to
type "kgid_t" from type "unsigned int"
xt_condition.c: In function "condition_mt_check":
xt_condition.c:158:24: error: incompatible types when assigning to
type "kuid_t" from type "unsigned int"
xt_condition.c:159:24: error: incompatible types when assigning to
type "kgid_t" from type "unsigned int"
xt_quota2.c: In function "q2_get_counter":
xt_quota2.c:134:18: error: incompatible types when assigning to type
"kuid_t" from type "unsigned int"
xt_quota2.c:135:18: error: incompatible types when assigning to type
"kgid_t" from type "unsigned int"
2013-06-08 15:10:20 +02:00
Dmitry Smirnov
e1d9825475 scripts: avoid bashism in xt_geoip_dl
xt_geoip_dl is marked to use /bin/sh. As such, avoid bashisms.
2013-06-02 17:29:12 +02:00
Dmitry Smirnov
efa8b9670a build: only scan manpages in extensions/
When using quilt to apply some patch to manpages, files named
libxt_*.man can appear within $srcdir/.pc which will be found by our
find(1) call. Limit the search to $srcdir/extensions to avoid this.
2013-06-02 17:18:58 +02:00
Jan Engelhardt
2b38d081a5 doc: spelling and grammar corrections to DNETMAP 2013-06-02 17:13:25 +02:00
Jan Engelhardt
fda591dba4 doc: replace apostrophes by proper situation-dependent puncutation 2013-06-02 16:59:44 +02:00
Jan Engelhardt
9de3027c02 doc: dissolve contractions 2013-06-02 16:59:14 +02:00
Jan Engelhardt
2dc8f21476 doc: more escapes for minuses 2013-06-02 16:57:50 +02:00