ixgbe: Fix secpath usage for IPsec TX offload.

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>

authored by Steffen Klassert and committed by David S. Miller f39b683d a21b7f0c

+2 -1
+2 -1
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
··· 36 #include <net/vxlan.h> 37 #include <net/mpls.h> 38 #include <net/xdp_sock.h> 39 40 #include "ixgbe.h" 41 #include "ixgbe_common.h" ··· 8698 #endif /* IXGBE_FCOE */ 8699 8700 #ifdef CONFIG_IXGBE_IPSEC 8701 - if (secpath_exists(skb) && 8702 !ixgbe_ipsec_tx(tx_ring, first, &ipsec_tx)) 8703 goto out_drop; 8704 #endif
··· 36 #include <net/vxlan.h> 37 #include <net/mpls.h> 38 #include <net/xdp_sock.h> 39 + #include <net/xfrm.h> 40 41 #include "ixgbe.h" 42 #include "ixgbe_common.h" ··· 8697 #endif /* IXGBE_FCOE */ 8698 8699 #ifdef CONFIG_IXGBE_IPSEC 8700 + if (xfrm_offload(skb) && 8701 !ixgbe_ipsec_tx(tx_ring, first, &ipsec_tx)) 8702 goto out_drop; 8703 #endif