summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2016-02-16 17:24:08 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2016-02-29 13:55:59 +0100
commitb07edbe1cf3dae9ba81f24888e2f2a9dbe778918 (patch)
treeed0bb89d4e43f6eea804b4d1cbad01050dae3b30 /lib
parentf12d33f4d83c6837d176e1aef337914089c77957 (diff)
downloadlinux-stable-b07edbe1cf3dae9ba81f24888e2f2a9dbe778918.tar.gz
linux-stable-b07edbe1cf3dae9ba81f24888e2f2a9dbe778918.tar.bz2
linux-stable-b07edbe1cf3dae9ba81f24888e2f2a9dbe778918.zip
netfilter: meta: add PRANDOM support
Can be used to randomly match packets e.g. for statistic traffic sampling. See commit 3ad0040573b0c00f8848 ("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>
Diffstat (limited to 'lib')
-rw-r--r--lib/random32.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/random32.c b/lib/random32.c
index 12111910ccd0..510d1ce7d4d2 100644
--- a/lib/random32.c
+++ b/lib/random32.c
@@ -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