Fstack: fixbug, bad checksum would lead to memleak of dpdk mbuf

This commit is contained in:
chenwei 2018-05-30 10:36:16 +08:00
parent 6285fb0406
commit 26d3eba6b1
1 changed files with 1 additions and 0 deletions

View File

@ -835,6 +835,7 @@ ff_veth_input(const struct ff_dpdk_if_context *ctx, struct rte_mbuf *pkt)
uint8_t rx_csum = ctx->hw_features.rx_csum;
if (rx_csum) {
if (pkt->ol_flags & (PKT_RX_IP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD)) {
rte_pktmbuf_free(pkt);
return;
}
}