Merge pull request #220 from chadwill/master

libfstack: fixbug, bad checksum would lead to memleak of dpdk mbuf
This commit is contained in:
logwang 2018-05-30 10:48:02 +08:00 committed by GitHub
commit df2f08ebcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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; uint8_t rx_csum = ctx->hw_features.rx_csum;
if (rx_csum) { if (rx_csum) {
if (pkt->ol_flags & (PKT_RX_IP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD)) { if (pkt->ol_flags & (PKT_RX_IP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD)) {
rte_pktmbuf_free(pkt);
return; return;
} }
} }