Skip to contentSkip to conversation

examples/ipsec-secgw: fix access to freed packet

PATCH Applied Anoob Joseph 2 participants 3 messages Aug 22, 2019 – Sep 19, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 examples/ipsec-secgw: fix access to freed packet

For unknown/unsupported packets, the packet would get checked for inline offloads after the packet is freed.

Fixes 0ccfd14bc10d ("examples/ipsec-secgw: support inline protocol")
---
 examples/ipsec-secgw/ipsec-secgw.c | 1 +
 1 file changed, 1 insertion(+)
examples/ipsec-secgw/ipsec-secgw.c +1 -0
index 0d1fd6a..fcd656b 100644
@@ -353,6 +353,7 @@ prepare_one_packet(struct rte_mbuf *pkt, struct ipsec_traffic *t)
 		RTE_LOG(ERR, IPSEC, "Unsupported packet type 0x%x\n",
 			rte_be_to_cpu_16(eth->ether_type));
 		rte_pktmbuf_free(pkt);
+		return;
 	}
 
 	/* Check if the packet has been processed inline. For inline protocol
Signature · 1 line
2.7.4