d98b0fc1af
If the overall pkt_len and segment lengths are out of agreement, it is possible for the seg to be NULL after the loop. Add assert to check this condition in debug builds. Otherwise, return failure. Fixes: c442fed81bb9 ("net: add function to calculate checksum in mbuf") Cc: stable@dpdk.org Signed-off-by: Chas Williams <3chas3@gmail.com>