netfilter: fixup the quota2, and enable.
authorJP Abgrall <jpa@google.com>
Tue, 12 Jul 2011 19:02:59 +0000 (12:02 -0700)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:51:24 +0000 (13:51 -0800)
commit6291fa48c9ccada9eaca0b128f66f7b6c1ad067a
tree3ed6c7d3c9eed34dec094b3820c427c6086b9af1
parent8577f158df19072bcc9bea7bdb2dfce333927205
netfilter: fixup the quota2, and enable.

The xt_quota2 came from
  http://sourceforge.net/projects/xtables-addons/develop

It needed tweaking for it to compile within the kernel tree.
Fixed kmalloc() and create_proc_entry() invocations within
 a non-interruptible context.
Removed useless copying of current quota back to the iptable's
struct matchinfo:
  - those are per CPU: they will change randomly based on which
    cpu gets to update the value.
  - they prevent matching a rule: e.g.
      -A chain -m quota2 --name q1 --quota 123
     can't be followed by
      -D chain -m quota2 --name q1 --quota 123
    as the 123 will be compared to the struct matchinfo's quota member.
Use the NETLINK NETLINK_NFLOG family to log a single message
when the quota limit is reached.
It uses the same packet type as ipt_ULOG, but
 - never copies skb data,
 - uses 112 as the event number (ULOG's +1)
It doesn't log if the module param "event_num" is 0.

Change-Id: I021d3b743db3b22158cc49acb5c94d905b501492
Signed-off-by: JP Abgrall <jpa@google.com>
net/netfilter/Kconfig
net/netfilter/Makefile
net/netfilter/xt_quota2.c