bpf: only test gso type on gso packets
authorWillem de Bruijn <willemb@google.com>
Wed, 6 Mar 2019 19:35:15 +0000 (14:35 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 19:10:06 +0000 (20:10 +0100)
commit9920eb4003c5e0f1447c2125c5c8e101b5ad8b8f
treece80838e9a20cf697b2875435d6ed566da648a06
parent206fa92c9d523dad266511dc69aa75c9a79369ec
bpf: only test gso type on gso packets

[ Upstream commit 4c3024debf62de4c6ac6d3cb4c0063be21d4f652 ]

BPF can adjust gso only for tcp bytestreams. Fail on other gso types.

But only on gso packets. It does not touch this field if !gso_size.

Fixes: b90efd225874 ("bpf: only adjust gso_size on bytestream protocols")
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/skbuff.h
net/core/filter.c