eal/windows: add missing SPDX license tag
[dpdk.git] / lib / librte_ip_frag / rte_ipv6_fragmentation.c
index 4344997..5d67336 100644 (file)
@@ -79,6 +79,15 @@ rte_ipv6_fragment_packet(struct rte_mbuf *pkt_in,
        uint16_t fragment_offset, frag_size;
        uint64_t frag_bytes_remaining;
 
+       /*
+        * Formal parameter checking.
+        */
+       if (unlikely(pkt_in == NULL) || unlikely(pkts_out == NULL) ||
+           unlikely(nb_pkts_out == 0) ||
+           unlikely(pool_direct == NULL) || unlikely(pool_indirect == NULL) ||
+           unlikely(mtu_size < RTE_IPV6_MIN_MTU))
+               return -EINVAL;
+
        /*
         * Ensure the IP payload length of all fragments (except the
         * the last fragment) are a multiple of 8 bytes per RFC2460.