bpf: add helper to invalidate hash

Add a small helper that complements 36bbef52c7 ("bpf: direct packet
write and access for helpers for clsact progs") for invalidating the
current skb->hash after mangling on headers via direct packet write.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Daniel Borkmann
2016-09-23 01:28:37 +02:00
committed by David S. Miller
parent 669dc4d76d
commit 7a4b28c6cc
2 changed files with 25 additions and 0 deletions

View File

@@ -419,6 +419,13 @@ enum bpf_func_id {
*/
BPF_FUNC_csum_update,
/**
* bpf_set_hash_invalid(skb)
* Invalidate current skb>hash.
* @skb: pointer to skb
*/
BPF_FUNC_set_hash_invalid,
__BPF_FUNC_MAX_ID,
};