]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: add flags to bpf_skb_store_bytes for clearing hash
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 4 Mar 2016 14:15:03 +0000 (15:15 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Mar 2016 18:55:15 +0000 (13:55 -0500)
commit3330b2671b74bbcf15baa3acc2872b83ed3ad24e
tree9566535cb2d9ce1cecb2926581f1c3b76577f11a
parent24f5d381e8724c3c887782bc510787c2cc1b1d93
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>
include/uapi/linux/bpf.h
net/core/filter.c