Skip to content

Commit f39b683

Browse files
klassertdavem330
authored andcommitted
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: 5925947 ("ixgbe: process the Tx ipsec offload") Reported-by: Michael Marley <[email protected]> Signed-off-by: Steffen Klassert <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a21b7f0 commit f39b683

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <net/vxlan.h>
3737
#include <net/mpls.h>
3838
#include <net/xdp_sock.h>
39+
#include <net/xfrm.h>
3940

4041
#include "ixgbe.h"
4142
#include "ixgbe_common.h"
@@ -8697,7 +8698,7 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
86978698
#endif /* IXGBE_FCOE */
86988699

86998700
#ifdef CONFIG_IXGBE_IPSEC
8700-
if (secpath_exists(skb) &&
8701+
if (xfrm_offload(skb) &&
87018702
!ixgbe_ipsec_tx(tx_ring, first, &ipsec_tx))
87028703
goto out_drop;
87038704
#endif

0 commit comments

Comments
 (0)