Commit Graph

15 Commits

Author SHA1 Message Date
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
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
5e020d380c build: remove support for Linux 2.6.26 2012-10-16 04:16:57 +02:00
Jan Engelhardt
0edb572f6e ACCOUNT: update to 1.16
There are no changes to integrate from ipt_ACCOUNT because xt_ACCOUT
already, by way of the compat_xtables layer, supports multiple kernel
versions.
2011-01-22 17:34:06 +01:00
Jan Engelhardt
cf9b60a57e ACCOUNT: remove uses of obsolete IPT_CONTINUE
And replace by XT_CONTINUE, to avoid compilation errors in 2.6.37.
2010-10-16 15:45:31 +02:00
Jan Engelhardt
5b472be9bb compat_xtables: move to 2.6.35 xt_action_param (1/3) 2010-05-13 19:28:37 +02:00
Jan Engelhardt
ad146dbeef compat_xtables: move to 2.6.35 API for targets 2010-04-05 02:15:20 +02:00
Jan Engelhardt
48327605c6 modules: replace AF/PF with NFPROTO 2010-03-17 02:25:40 +01:00
Jan Engelhardt
359ecc7a8c ACCOUNT: transfer table data in host order
Make compatibility happy.
2009-11-04 23:37:34 +01:00
Jan Engelhardt
df7168bb4d ACCOUNT: use more precise types and fix minor tidbits 2009-10-30 18:48:04 +01:00
Jan Engelhardt
0aa7be2f1d ACCOUNT: annotate source where BE is used 2009-10-30 18:42:40 +01:00
Jan Engelhardt
8bd6ef78f9 ACCOUNT: correctly account for network-order addresses on BE arches 2009-10-30 18:36:47 +01:00
Jan Engelhardt
578af6f726 ACCOUNT: move private struct declarations into .c file 2009-10-27 11:04:23 +01:00
Jan Engelhardt
3c1bf73e8e ACCOUNT: mark reg structure __read_mostly 2009-10-06 23:42:48 +02:00
Jan Engelhardt
5cb36ed213 ACCOUNT: move xt_ACCOUNT into its own subdirectory
Will be adding related userspace programs shortly, and an extra
directory for the same reason it is for ipset/.
2009-09-24 01:00:15 +02:00