]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - net/netfilter/nf_tables_api.c
netfilter: nf_tables: add optional user data area to rules
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 19 Feb 2014 16:27:06 +0000 (17:27 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 27 Feb 2014 15:56:00 +0000 (16:56 +0100)
commit0768b3b3d228c5acf2075f40f3d25cda30011d4f
tree692c78e345c357dbc036c093abb3a1062e928291
parent39111fd261f544acb0333d59fca27abc2f767ad7
netfilter: nf_tables: add optional user data area to rules

This allows us to store user comment strings, but it could be also
used to store any kind of information that the user application needs
to link to the rule.

Scratch 8 bits for the new ulen field that indicates the length the
user data area. 4 bits from the handle (so it's 42 bits long, according
to Patrick, it would last 139 years with 1000 new rules per second)
and 4 bits from dlen (so the expression data area is 4K, which seems
sufficient by now even considering the compatibility layer).

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Patrick McHardy <kaber@trash.net>
include/net/netfilter/nf_tables.h
include/uapi/linux/netfilter/nf_tables.h
net/netfilter/nf_tables_api.c