]> git.ipfire.org Git - thirdparty/nftables.git/commit
src: make hash seed attribute optional
authorLaura Garcia Liebana <nevola@gmail.com>
Fri, 4 Nov 2016 12:59:31 +0000 (13:59 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 8 Nov 2016 23:21:39 +0000 (00:21 +0100)
commit7f027e82d7a21f8b088bcc7c838774071e79b89b
treeb99296da18cd12c40e80c02be39495cd8dd5e91c
parentb9913c199cd70e2928adf5d735bf7508596fcfc2
src: make hash seed attribute optional

The hash expression requires a seed attribute to call the jhash
operation, eg.

 # nft add rule x y meta mark set jhash ip saddr . ip daddr mod 2 \
seed 0xdeadbeef

With this patch the seed attribute is optional and it's generated by a
random function from userspace, eg.

 # nft add rule x y meta mark set jhash ip saddr . ip daddr mod 2

The kernel will take care of generate a random seed.

Signed-off-by: Laura Garcia Liebana <nevola@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/parser_bison.y
tests/py/ip/hash.t
tests/py/ip/hash.t.payload