]> git.ipfire.org Git - thirdparty/nftables.git/commit
hash: generate a random seed if seed option is empty
authorLiping Zhang <zlpnobody@gmail.com>
Sat, 15 Apr 2017 09:22:17 +0000 (17:22 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sat, 15 Apr 2017 09:30:08 +0000 (11:30 +0200)
commite2b25ccc31b8262a0739b46337fbb354e00aa1d6
tree05db8f700716c22ef19ff6153807a173d17a8821
parentcd3877cd4a7c4943dc29c274366795f02c42feb0
hash: generate a random seed if seed option is empty

Typing the "nft add rule x y ct mark set jhash ip saddr mod 2" will
not generate a random seed, instead, the seed will always be zero.

So if seed option is empty, we shoulde not set the NFTA_HASH_SEED
attribute, then a random seed will be generated in the kernel.

Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/expression.h
include/hash.h
src/hash.c
src/netlink_delinearize.c
src/netlink_linearize.c
src/parser_bison.y
tests/py/ip/hash.t
tests/py/ip/hash.t.payload