]> git.baikalelectronics.ru Git - kernel.git/commit
net/xfrm: IPsec tunnel mode fix inner_ipproto setting in sec_path
authorRaed Salem <raeds@nvidia.com>
Mon, 3 Jan 2022 11:19:29 +0000 (13:19 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 5 Jan 2022 09:59:35 +0000 (10:59 +0100)
commit703fa61172fa110dd7f0daa6f82aaa042617ff3e
tree848b3c400aed5932cedb0c7e91eb71b46e71d642
parent73d26648dc36d64b59f0f375fa9d575882bdddb8
net/xfrm: IPsec tunnel mode fix inner_ipproto setting in sec_path

The inner_ipproto saves the inner IP protocol of the plain
text packet. This allows vendor's IPsec feature making offload
decision at skb's features_check and configuring hardware at
ndo_start_xmit, current code implenetation did not handle the
case where IPsec is used in tunnel mode.

Fix by handling the case when IPsec is used in tunnel mode by
reading the protocol of the plain text packet IP protocol.

Fixes: 51e7d2b0e7cb ("net/xfrm: Add inner_ipproto into sec_path")
Signed-off-by: Raed Salem <raeds@nvidia.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_output.c