]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nfnetlink_queue: add NFQA_CAP_LEN attribute
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 24 Sep 2012 12:52:12 +0000 (14:52 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 24 Sep 2012 13:10:29 +0000 (15:10 +0200)
commit354113314a7728e799331a1d4ceda4527d2bad48
tree23306d3404c684e05bf537c9d4df7df572663509
parent89d114089ac38bbe41eff28e1457d36027c69c81
netfilter: nfnetlink_queue: add NFQA_CAP_LEN attribute

This patch adds the NFQA_CAP_LEN attribute that allows us to know
what is the real packet size from user-space (even if we decided
to retrieve just a few bytes from the packet instead of all of it).

Security software that inspects packets should always check for
this new attribute to make sure that it is inspecting the entire
packet.

This also helps to provide a workaround for the problem described
in: http://marc.info/?l=netfilter-devel&m=134519473212536&w=2

Original idea from Florian Westphal.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/linux/netfilter/nfnetlink_queue.h
net/netfilter/nfnetlink_queue_core.c