Skip to content

Commit

Permalink
Update tcpdemux.cpp (#262)
Browse files Browse the repository at this point in the history
Closes #261
  • Loading branch information
simsong committed Jun 17, 2024
1 parent f451564 commit 158b0d3
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 158b0d3

Please sign in to comment.