Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tcpdemux.cpp #262

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/tcpdemux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ int tcpdemux::process_ip4(const be13::packet_info &pi)
}

/* check and see if we got everything. NOTE: we must use
* ip_total_len after this, because we may have captured bytes
* ip_len after this, because we may have captured bytes
* beyond the end of the packet (e.g. ethernet padding).
*/
size_t ip_len = ntohs(ip_header->ip_len);
Expand All @@ -745,7 +745,7 @@ int tcpdemux::process_ip4(const be13::packet_info &pi)
}

/* do TCP processing, faking an ipv6 address */
uint16_t ip_payload_len = pi.ip_datalen - ip_header_len;
uint16_t ip_payload_len = ip_len - ip_header_len;
ipaddr src(ip_header->ip_src.addr);
ipaddr dst(ip_header->ip_dst.addr);
return (this->*tcp_processor)(src, dst ,AF_INET,
Expand Down
Loading