[v3,3/3] linux-gen: pktio: loop: check for ip error before trying IPsec

Message ID 1517968807-18097-4-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • [v3,1/3] linux-gen: use packet pointer in _odp_ipsec_try_inline
Related show

Commit Message

Github ODP bot Feb. 7, 2018, 2 a.m.
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Check for ip_err error flag before calling _odp_ipsec_try_inline().

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 456 (lumag:ipsec-fix)
 ** https://github.com/Linaro/odp/pull/456
 ** Patch: https://github.com/Linaro/odp/pull/456.patch
 ** Base sha: 257b08b35ceea41bad5a7f1c626496cf111e657a
 ** Merge commit sha: e8666889f21113d1d24bf1d03ccd0bde538eabf0
 **/
 platform/linux-generic/pktio/loop.c | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/platform/linux-generic/pktio/loop.c b/platform/linux-generic/pktio/loop.c
index a210c74ef..3ee2e33af 100644
--- a/platform/linux-generic/pktio/loop.c
+++ b/platform/linux-generic/pktio/loop.c
@@ -156,6 +156,7 @@  static int loopback_recv(pktio_entry_t *pktio_entry, int index ODP_UNUSED,
 
 		/* Try IPsec inline processing */
 		if (pktio_entry->s.config.inbound_ipsec &&
+		    !pkt_hdr->p.error_flags.ip_err &&
 		    _odp_packet_has_ipsec(pkt))
 			_odp_ipsec_try_inline(&pkt);