From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 433002952 for ; Wed, 2 Nov 2016 11:20:46 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP; 02 Nov 2016 03:20:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,583,1473145200"; d="scan'208";a="26465583" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by fmsmga006.fm.intel.com with ESMTP; 02 Nov 2016 03:20:44 -0700 From: Yuanhan Liu To: Sergio Gonzalez Monroy Date: Wed, 2 Nov 2016 18:20:57 +0800 Message-Id: <1478082097-16957-1-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 Cc: Pablo de Lara , dpdk stable Subject: [dpdk-stable] patch 'examples/ipsec-secgw: check SP only when setup' has been queued to stable release 16.07.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2016 10:20:47 -0000 Hi, FYI, your patch has been queued to stable release 16.07.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/06/16. So please shout if anyone has objections. Thanks. --yliu --- >>From ffb20410c8326806428c8b3bad13a63407ca3a39 Mon Sep 17 00:00:00 2001 From: Sergio Gonzalez Monroy Date: Thu, 29 Sep 2016 16:44:11 +0100 Subject: [PATCH] examples/ipsec-secgw: check SP only when setup [ upstream commit 6e1892a698bb609962038606189dea1aa1fcd1b0 ] Application will segfault if there is IPv4 or IPv6 and no SP/ACL rules for IPv4 or IPv6 respectively. Avoid checking the ACL/SP in such cases. Fixes: 906257e965b7 ("examples/ipsec-secgw: support IPv6") Signed-off-by: Sergio Gonzalez Monroy Acked-by: Pablo de Lara --- examples/ipsec-secgw/ipsec-secgw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index 5d04eb3..266ae20 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -390,7 +390,7 @@ inbound_sp_sa(struct sp_ctx *sp, struct sa_ctx *sa, struct traffic_type *ip, struct rte_mbuf *m; uint32_t i, j, res, sa_idx; - if (ip->num == 0) + if (ip->num == 0 || sp == NULL) return; rte_acl_classify((struct rte_acl_ctx *)sp, ip->data, ip->res, @@ -465,7 +465,7 @@ outbound_sp(struct sp_ctx *sp, struct traffic_type *ip, struct rte_mbuf *m; uint32_t i, j, sa_idx; - if (ip->num == 0) + if (ip->num == 0 || sp == NULL) return; rte_acl_classify((struct rte_acl_ctx *)sp, ip->data, ip->res, -- 1.9.0