]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: add hash expression
authorLaura Garcia Liebana <nevola@gmail.com>
Thu, 11 Aug 2016 16:02:07 +0000 (18:02 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 12 Aug 2016 12:16:04 +0000 (14:16 +0200)
commitee9f0484e0a912b27edbd093f047ad8dce57e050
tree697f80cc7ac91f39cf5eeb2df4e50eeae695000c
parent7b2314c5dcf44ffe02e1d8986706c9225fe5b6ad
netfilter: nf_tables: add hash expression

This patch adds a new hash expression, this provides jhash support but
this can be extended to support for other hash functions. The modulus
and seed already comes embedded into this new expression.

Use case example:

... meta mark set hash ip saddr mod 10

Signed-off-by: Laura Garcia Liebana <nevola@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/uapi/linux/netfilter/nf_tables.h
net/netfilter/Kconfig
net/netfilter/Makefile
net/netfilter/nft_hash.c [new file with mode: 0644]