devtools: support older compilers with meson test
[dpdk.git] / lib / librte_gro / gro_vxlan_tcp4.c
index 955ae4b..acb9bc9 100644 (file)
@@ -306,6 +306,13 @@ gro_vxlan_tcp4_reassemble(struct rte_mbuf *pkt,
        uint16_t hdr_len;
        uint8_t find;
 
+       /*
+        * Don't process the packet whose TCP header length is greater
+        * than 60 bytes or less than 20 bytes.
+        */
+       if (unlikely(INVALID_TCP_HDRLEN(pkt->l4_len)))
+               return -1;
+
        outer_eth_hdr = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
        outer_ipv4_hdr = (struct ipv4_hdr *)((char *)outer_eth_hdr +
                        pkt->outer_l2_len);