summaryrefslogtreecommitdiff
path: root/lib/librte_ip_frag/rte_ipv4_reassembly.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librte_ip_frag/rte_ipv4_reassembly.c')
-rw-r--r--lib/librte_ip_frag/rte_ipv4_reassembly.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/librte_ip_frag/rte_ipv4_reassembly.c b/lib/librte_ip_frag/rte_ipv4_reassembly.c
index dc4d036..5d24843 100644
--- a/lib/librte_ip_frag/rte_ipv4_reassembly.c
+++ b/lib/librte_ip_frag/rte_ipv4_reassembly.c
@@ -85,8 +85,7 @@ ipv4_frag_reassemble(const struct ip_frag_pkt *fp)
m->ol_flags |= PKT_TX_IP_CKSUM;
/* update ipv4 header for the reassmebled packet */
- ip_hdr = (struct ipv4_hdr*)(rte_pktmbuf_mtod(m, uint8_t *) +
- m->l2_len);
+ ip_hdr = rte_pktmbuf_mtod_offset(m, struct ipv4_hdr *, m->l2_len);
ip_hdr->total_length = rte_cpu_to_be_16((uint16_t)(fp->total_size +
m->l3_len));