kernel_optimize_test/net/core
Andrea Mayer 2d4efc9a0e seg6: bpf: fix skb checksum in bpf_push_seg6_encap()
[ Upstream commit 4889fbd98deaf243c3baadc54e296d71c6af1eb0 ]

Both helper functions bpf_lwt_seg6_action() and bpf_lwt_push_encap() use
the bpf_push_seg6_encap() to encapsulate the packet in an IPv6 with Segment
Routing Header (SRH) or insert an SRH between the IPv6 header and the
payload.
To achieve this result, such helper functions rely on bpf_push_seg6_encap()
which, in turn, leverages seg6_do_srh_{encap,inline}() to perform the
required operation (i.e. encap/inline).

This patch removes the initialization of the IPv6 header payload length
from bpf_push_seg6_encap(), as it is now handled properly by
seg6_do_srh_{encap,inline}() to prevent corruption of the skb checksum.

Fixes: fe94cc290f ("bpf: Add IPv6 Segment Routing helpers")
Signed-off-by: Andrea Mayer <andrea.mayer@uniroma2.it>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-07-21 21:20:11 +02:00
..
bpf_sk_storage.c bpf: Change bpf_sk_storage_*() to accept ARG_PTR_TO_BTF_ID_SOCK_COMMON 2020-09-25 13:58:01 -07:00
datagram.c udp: fix skb_copy_and_csum_datagram with odd segment sizes 2021-02-17 11:02:28 +01:00
datagram.h
dev_addr_lists.c net: core: add nested_level variable in net_device 2020-09-28 15:00:15 -07:00
dev_ioctl.c net: fix dev_ifsioc_locked() race condition 2021-03-07 12:34:07 +01:00
dev.c net: remove two BUG() from skb_checksum_help() 2022-06-09 10:20:54 +02:00
devlink.c devlink: Remove misleading internal_flags from health reporter dump 2022-01-27 10:54:34 +01:00
drop_monitor.c drop_monitor: fix data-race in dropmon_net_event / trace_napi_poll_hit 2022-02-23 12:01:02 +01:00
dst_cache.c wireguard: device: reset peer src endpoint when netns exits 2021-12-08 09:03:22 +01:00
dst.c net, bpf: Fix ip6ip6 crash with collect_md populated skbs 2021-03-30 14:32:05 +02:00
failover.c
fib_notifier.c
fib_rules.c ipv6: fix memory leak in fib6_rule_suppress 2021-12-08 09:03:21 +01:00
filter.c seg6: bpf: fix skb checksum in bpf_push_seg6_encap() 2022-07-21 21:20:11 +02:00
flow_dissector.c net/sched: flower: fix parsing of ethertype following VLAN header 2022-04-20 09:23:11 +02:00
flow_offload.c netfilter: nf_tables: bail out early if hardware offload is not supported 2022-06-14 18:32:40 +02:00
gen_estimator.c net_sched: gen_estimator: support large ewma log 2021-01-27 11:55:23 +01:00
gen_stats.c
gro_cells.c gro_cells: reduce number of synchronize_net() calls 2020-11-25 11:28:12 -08:00
hwbm.c
link_watch.c net: linkwatch: fix failure to restore device state across suspend/resume 2021-08-18 08:59:13 +02:00
lwt_bpf.c bpf, lwt: Fix crash when using bpf_skb_set_tunnel_key() from bpf_xmit lwt hook 2022-05-09 09:05:02 +02:00
lwtunnel.c lwtunnel: Validate RTA_ENCAP_TYPE attribute length 2022-01-11 15:25:00 +01:00
Makefile
neighbour.c net, neigh: clear whole pneigh_entry at alloc time 2021-12-14 11:32:43 +01:00
net_namespace.c netns: add schedule point in ops_exit_list() 2022-01-27 10:54:33 +01:00
net-procfs.c net-procfs: show net devices bound packet types 2022-02-01 17:25:44 +01:00
net-sysfs.c net-sysfs: add check for netdevice being present to speed_show 2022-03-16 14:16:00 +01:00
net-sysfs.h
net-traces.c
netclassid_cgroup.c
netevent.c
netpoll.c net: Have netpoll bring-up DSA management interface 2020-11-18 11:04:11 -08:00
netprio_cgroup.c
page_pool.c mm: fix struct page layout on 32-bit systems 2021-05-19 10:13:17 +02:00
pktgen.c pktgen: fix misuse of BUG_ON() in pktgen_thread_worker() 2021-03-07 12:34:09 +01:00
ptp_classifier.c
request_sock.c
rtnetlink.c net: limit altnames to 64k total 2022-04-13 21:01:00 +02:00
scm.c
secure_seq.c secure_seq: use the 64 bits of the siphash for port offset calculation 2022-05-30 09:33:23 +02:00
skbuff.c net: fix up skbs delta_truesize in UDP GRO frag_list 2022-03-08 19:09:32 +01:00
skmsg.c bpf, sockmap: Fix memleak in tcp_bpf_sendmsg while sk msg is full 2022-04-08 14:40:21 +02:00
sock_diag.c bpf, net: Rework cookie generator as per-cpu one 2020-09-30 11:50:35 -07:00
sock_map.c bpf: Fix integer overflow in argument calculation for bpf_map_area_alloc 2021-12-17 10:14:41 +01:00
sock_reuseport.c udp: Prevent reuseport_select_sock from reading uninitialized socks 2021-01-23 16:03:59 +01:00
sock.c sock: fix /proc/net/sockstat underflow in sk_clone_lock() 2021-11-26 10:39:14 +01:00
stream.c net: stream: don't purge sk_error_queue in sk_stream_kill_queues() 2021-11-18 14:04:08 +01:00
sysctl_net_core.c bpf: Prevent increasing bpf_jit_limit above max 2021-11-18 14:03:42 +01:00
timestamping.c
tso.c
utils.c
xdp.c xdp: fix xdp_return_frame() kernel BUG throw for page_pool memory model 2021-04-14 08:42:09 +02:00