From patchwork Thu Apr 29 10:47:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ananyev, Konstantin" X-Patchwork-Id: 92406 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CE1FAA0547; Thu, 29 Apr 2021 12:48:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8DBCC41194; Thu, 29 Apr 2021 12:48:11 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 5B38A41125 for ; Thu, 29 Apr 2021 12:48:10 +0200 (CEST) IronPort-SDR: bnzWV/mKNpxt+h7/XnKZ1xJVG+6teENr1yE7CwJkLLIMqTQEjRTkapkxakDria03ESz5ONyGwA iwSzYXoZQIIQ== X-IronPort-AV: E=McAfee;i="6200,9189,9968"; a="197077300" X-IronPort-AV: E=Sophos;i="5.82,259,1613462400"; d="scan'208";a="197077300" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2021 03:48:09 -0700 IronPort-SDR: ZnZLfBnwclHPWpKc6c1VPviqjZ2pPM1Ftbp1esjNxhRuIEAB/UIQYtSl0qm6wEMJj7D2Iod8Rc aW9vj0exW8iw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,259,1613462400"; d="scan'208";a="425958338" Received: from sivswdev08.ir.intel.com ([10.237.217.47]) by orsmga007.jf.intel.com with ESMTP; 29 Apr 2021 03:48:07 -0700 From: Konstantin Ananyev To: dev@dpdk.org Cc: vladimir.medvedkin@intel.com, ktejasree@marvell.com, gakhil@marvell.com, radu.nicolau@intel.com, Konstantin Ananyev Date: Thu, 29 Apr 2021 11:47:57 +0100 Message-Id: <20210429104757.4601-1-konstantin.ananyev@intel.com> X-Mailer: git-send-email 2.18.0 Subject: [dpdk-dev] [PATCH] examples/ipsec-secgw: fix handling IPv6 extension headers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Recent patch to support UDP encapsulation introduced problem with handling inbound IPv6 packets with header extensions. This patch aims to fix the issue. Bugzilla ID: 695 Fixes: 9a1cc8f1ed74 ("examples/ipsec-secgw: support UDP encapsulation") Reported-by: Vladimir Medvedkin Signed-off-by: Konstantin Ananyev Acked-by: Akhil Goyal --- examples/ipsec-secgw/ipsec-secgw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index a9f9b5859..f252d3498 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -426,7 +426,7 @@ prepare_one_packet(struct rte_mbuf *pkt, struct ipsec_traffic *t) return; } - switch (iph6->proto) { + switch (next_proto) { case IPPROTO_ESP: t->ipsec.pkts[(t->ipsec.num)++] = pkt; break;