mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 14:41:27 +00:00
netfilter: meta: add PRANDOM support
Can be used to randomly match packets e.g. for statistic traffic sampling.
See commit 3ad0040573
("bpf: split state from prandom_u32() and consolidate {c, e}BPF prngs")
for more info why this doesn't use prandom_u32 directly.
Unlike bpf nft_meta can be built as a module, so add an EXPORT_SYMBOL
for prandom_seed_full_state too.
Cc: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
f12d33f4d8
commit
b07edbe1cf
3 changed files with 14 additions and 0 deletions
|
@ -255,6 +255,7 @@ void prandom_seed_full_state(struct rnd_state __percpu *pcpu_state)
|
|||
prandom_warmup(state);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(prandom_seed_full_state);
|
||||
|
||||
/*
|
||||
* Generate better values after random number generator
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue