aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/test_lwt_ip_encap.sh
diff options
context:
space:
mode:
authorPeter Oskolkov <posk@google.com>2019-03-04 16:27:08 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2019-03-07 10:41:29 +0100
commitea0371f7879987cff70e21d808e3e9fea624c051 (patch)
tree3e5382a16a4fe6485a32fd87b160364665e713cc /tools/testing/selftests/bpf/test_lwt_ip_encap.sh
parentxsk: fix potential crash in xsk_diag_put_umem() (diff)
downloadlinux-dev-ea0371f7879987cff70e21d808e3e9fea624c051.tar.xz
linux-dev-ea0371f7879987cff70e21d808e3e9fea624c051.zip
net: fix GSO in bpf_lwt_push_ip_encap
GSO needs inner headers and inner protocol set properly to work. skb->inner_mac_header: skb_reset_inner_headers() assigns the current mac header value to inner_mac_header; but it is not set at the point, so we need to call skb_reset_inner_mac_header, otherwise gre_gso_segment fails: it does int tnl_hlen = skb_inner_mac_header(skb) - skb_transport_header(skb); ... if (unlikely(!pskb_may_pull(skb, tnl_hlen))) ... skb->inner_protocol should also be correctly set. Fixes: ca78801a81e0 ("bpf: handle GSO in bpf_lwt_push_encap") Signed-off-by: Peter Oskolkov <posk@google.com> Reviewed-by: David Ahern <dsahern@gmail.com> Acked-by: Song Liu <songliubraving@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/testing/selftests/bpf/test_lwt_ip_encap.sh')
0 files changed, 0 insertions, 0 deletions