ixgbe: Fix secpath usage for IPsec TX offload.
authorSteffen Klassert <steffen.klassert@secunet.com>
Thu, 12 Sep 2019 11:01:44 +0000 (13:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Sep 2019 07:09:29 +0000 (09:09 +0200)
commitb26f489245b3cf0c06d09a10a8cbdd426af94df6
tree9fcfe90b884a4f720b968fd3da4a70cf9be0e59a
parent2354e925e3616e028079353c87c0dd55f5225fc1
ixgbe: Fix secpath usage for IPsec TX offload.

[ Upstream commit f39b683d35dfa93a58f1b400a8ec0ff81296b37c ]

The ixgbe driver currently does IPsec TX offloading
based on an existing secpath. However, the secpath
can also come from the RX side, in this case it is
misinterpreted for TX offload and the packets are
dropped with a "bad sa_idx" error. Fix this by using
the xfrm_offload() function to test for TX offload.

Fixes: 592594704761 ("ixgbe: process the Tx ipsec offload")
Reported-by: Michael Marley <michael@michaelmarley.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c