From 5111b8e38661a39c712e6e8f9a79ef3b97b45ec8 Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Tue, 2 Mar 2021 14:04:30 -0700 Subject: [PATCH] Fix comment in IP analyzer --- src/packet_analysis/protocol/ip/IP.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/packet_analysis/protocol/ip/IP.cc b/src/packet_analysis/protocol/ip/IP.cc index df3a9dfabc..dcc79cc4d8 100644 --- a/src/packet_analysis/protocol/ip/IP.cc +++ b/src/packet_analysis/protocol/ip/IP.cc @@ -71,7 +71,8 @@ bool IPAnalyzer::AnalyzePacket(size_t len, const uint8_t* data, Packet* packet) const struct ip* ip4 = packet->ip_hdr->IP4_Hdr(); - // total_len is the length of the packet minus all of the headers so far, including IP + // TotalLen() returns the full length of the IP portion of the packet, including + // the IP header and payload. uint32_t total_len = packet->ip_hdr->TotalLen(); if ( total_len == 0 ) {