summaryrefslogtreecommitdiff
path: root/init/do_mounts_initrd.c
diff options
context:
space:
mode:
authorMike Yu <yumike@google.com>2024-03-04 12:24:08 +0000
committerSteffen Klassert <steffen.klassert@secunet.com>2024-03-05 10:48:18 +0100
commitd4872d70fc6feabfc8e897edad993a81096ade9f (patch)
tree8732f9e10027cd3b8f0a60892510503a506d016d /init/do_mounts_initrd.c
parent1a807e46aa93ebad1dfbed4f82dc3bf779423a6e (diff)
xfrm: fix xfrm child route lookup for packet offload
In current code, xfrm_bundle_create() always uses the matched SA's family type to look up a xfrm child route for the skb. The route returned by xfrm_dst_lookup() will eventually be used in xfrm_output_resume() (skb_dst(skb)->ops->local_out()). If packet offload is used, the above behavior can lead to calling ip_local_out() for an IPv6 packet or calling ip6_local_out() for an IPv4 packet, which is likely to fail. This change fixes the behavior by checking if the matched SA has packet offload enabled. If not, keep the same behavior; if yes, use the matched SP's family type for the lookup. Test: verified IPv6-in-IPv4 packets on Android device with IPsec packet offload enabled Signed-off-by: Mike Yu <yumike@google.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'init/do_mounts_initrd.c')
0 files changed, 0 insertions, 0 deletions