X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fipsec-secgw%2Fipsec-secgw.c;h=9eee96fbcf468fcedef80c8cfcbcb763ea09f432;hb=6e1892a698bb609962038606189dea1aa1fcd1b0;hp=8b55534f37a717bb42656d4a91b0f3f261b87dc8;hpb=4470c22de2e1c2b4bf2f5486c43102d2aca58b8a;p=dpdk.git diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index 8b55534f37..9eee96fbcf 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -388,7 +388,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, @@ -463,7 +463,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,