提交 8c22195c 编写于 作者: S Steffen Klassert 提交者: Xie XiuQi

ixgbe: Fix secpath usage for IPsec TX offload.

[ Upstream commit f39b683d ]

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: 59259470 ("ixgbe: process the Tx ipsec offload")
Reported-by: NMichael Marley <michael@michaelmarley.com>
Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 2a1229f5
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <net/tc_act/tc_mirred.h> #include <net/tc_act/tc_mirred.h>
#include <net/vxlan.h> #include <net/vxlan.h>
#include <net/mpls.h> #include <net/mpls.h>
#include <net/xfrm.h>
#include "ixgbe.h" #include "ixgbe.h"
#include "ixgbe_common.h" #include "ixgbe_common.h"
...@@ -8599,7 +8600,8 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb, ...@@ -8599,7 +8600,8 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
#endif /* IXGBE_FCOE */ #endif /* IXGBE_FCOE */
#ifdef CONFIG_XFRM_OFFLOAD #ifdef CONFIG_XFRM_OFFLOAD
if (skb->sp && !ixgbe_ipsec_tx(tx_ring, first, &ipsec_tx)) if (xfrm_offload(skb) &&
!ixgbe_ipsec_tx(tx_ring, first, &ipsec_tx))
goto out_drop; goto out_drop;
#endif #endif
tso = ixgbe_tso(tx_ring, first, &hdr_len, &ipsec_tx); tso = ixgbe_tso(tx_ring, first, &hdr_len, &ipsec_tx);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册