diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2016-03-04 09:15:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-03-08 13:55:15 -0500 |
commit | 8afd54c87ad7089734ef0527937a256586ba828a (patch) | |
tree | 9566535cb2d9ce1cecb2926581f1c3b76577f11a /include/uapi | |
parent | 8050c0f0274a15841756968857cfb07b3ab809ae (diff) |
bpf: add flags to bpf_skb_store_bytes for clearing hash
When overwriting parts of the packet with bpf_skb_store_bytes() that
were fed previously into skb->hash calculation, we should clear the
current hash with skb_clear_hash(), so that a next skb_get_hash() call
can determine the correct hash related to this skb.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/bpf.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index ee2193287cbe..2e3e90309904 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h | |||
@@ -305,6 +305,7 @@ enum bpf_func_id { | |||
305 | 305 | ||
306 | /* BPF_FUNC_skb_store_bytes flags. */ | 306 | /* BPF_FUNC_skb_store_bytes flags. */ |
307 | #define BPF_F_RECOMPUTE_CSUM (1ULL << 0) | 307 | #define BPF_F_RECOMPUTE_CSUM (1ULL << 0) |
308 | #define BPF_F_INVALIDATE_HASH (1ULL << 1) | ||
308 | 309 | ||
309 | /* BPF_FUNC_l3_csum_replace and BPF_FUNC_l4_csum_replace flags. | 310 | /* BPF_FUNC_l3_csum_replace and BPF_FUNC_l4_csum_replace flags. |
310 | * First 4 bits are for passing the header field size. | 311 | * First 4 bits are for passing the header field size. |