summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtmultipath.c
diff options
context:
space:
mode:
authorDaniel Axtens <dja@axtens.net>2018-03-03 03:03:46 +0100
committerAlexei Starovoitov <ast@kernel.org>2018-03-03 13:01:11 -0800
commitd02f51cbcf12b09ab945873e35046045875eed9a (patch)
tree986c3a4022275f49fde59e84ab1435ff738b8752 /net/sunrpc/xprtmultipath.c
parent4a0c7191c75e94b0aaaa52855bf44d94bfe97403 (diff)
downloadlinux-d02f51cbcf12b09ab945873e35046045875eed9a.tar.gz
linux-d02f51cbcf12b09ab945873e35046045875eed9a.tar.bz2
linux-d02f51cbcf12b09ab945873e35046045875eed9a.zip
bpf: fix bpf_skb_adjust_net/bpf_skb_proto_xlat to deal with gso sctp skbs
SCTP GSO skbs have a gso_size of GSO_BY_FRAGS, so any sort of unconditionally mangling of that will result in nonsense value and would corrupt the skb later on. Therefore, i) add two helpers skb_increase_gso_size() and skb_decrease_gso_size() that would throw a one time warning and bail out for such skbs and ii) refuse and return early with an error in those BPF helpers that are affected. We do need to bail out as early as possible from there before any changes on the skb have been performed. Fixes: 6578171a7ff0 ("bpf: add bpf_skb_change_proto helper") Co-authored-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Daniel Axtens <dja@axtens.net> Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'net/sunrpc/xprtmultipath.c')
0 files changed, 0 insertions, 0 deletions