buger / goreplay

GoReplay is an open-source tool for capturing and replaying live HTTP traffic into a test environment in order to continuously test your system with real data. It can be used to increase confidence in code deployments, configuration changes and infrastructure changes.
https://goreplay.org
Other
18.53k stars 13 forks source link

Fix ethernet trailers #1102

Open buger opened 2 years ago

buger commented 2 years ago

When packet is less then 60 bytes, ethernet layer can add trailers to the end of packet, and current implementation treats it as packet with data.

IP layer has total length of the payload, so here we ensure that we limit TCP payload by the know length specified in IP header. https://stackoverflow.com/questions/13738206/ip-packet-has-trailer-on-the-receiver-side-but-not-on-the-sender-side

Also added a small fix for --input-raw-engine pcap_file mode, so it will wait a bit after replay (it is too fast from file, and not all packet was processed)


Latest forum discussions:

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication