path: root/examples/ipv4_multicast
diff options
authorHerakliusz Lipiec <>2018-11-13 11:49:29 +0000
committerThomas Monjalon <>2018-11-18 22:55:52 +0100
commit91dc9c13ba978fb8147240ed6fa20c41145bf0db (patch)
treed314972c1a22e0c768cc508ed6cae5f8acdcc5ce /examples/ipv4_multicast
parente772cf1bd0c10c13375d7de9acff842b76cb8f35 (diff)
examples/ipv4_multicast: fix leak of cloned packets
The ipv4_multicast sample application was dropping packets when using mbuf clone. When creating an L2 header and copying metadata from the source packet, the ol_flags were also copied along with all the other metadata. Because the cloned packet had IND_ATTACHED_MBUF flag set in its ol_flags, this caused the packets to never be freed when using rte_pktmbuf_free. Since copying ol_flags from the cloned packet is not necessary in the first place, just don't do it. Fixes: af75078fece3 ("first public release") Cc: Reported-by: Dong Wang <> Signed-off-by: Herakliusz Lipiec <> Acked-by: Konstantin Ananyev <> Acked-by: Dong Wang <>
Diffstat (limited to 'examples/ipv4_multicast')
1 files changed, 0 insertions, 2 deletions
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index 4073a49..428ca46 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -266,8 +266,6 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone)
hdr->tx_offload = pkt->tx_offload;
hdr->hash = pkt->hash;
- hdr->ol_flags = pkt->ol_flags;
__rte_mbuf_sanity_check(hdr, 1);
return hdr;