Do not forward padding to downstream TCP packet analyzer

This is similar to GH-3206. There do not seem to be practical
consequences - but we should still fix it.

This also includes the udp-testcase that was forgotten in GH-3206.
This commit is contained in:
Johanna Amann 2023-08-02 17:17:01 +01:00
parent 1a54e66b53
commit 940e3afab4
6 changed files with 35 additions and 2 deletions

View file

@ -130,8 +130,8 @@ void TCPAnalyzer::DeliverPacket(Connection* c, double t, bool is_orig, int remai
// Call DeliverPacket on the adapter directly here. Normally we'd call ForwardPacket
// but this adapter does some other things in its DeliverPacket with the packet children
// analyzers.
adapter->DeliverPacket(remaining, data, is_orig, adapter->LastRelDataSeq(), ip.get(),
pkt->cap_len);
adapter->DeliverPacket(std::min(len, remaining), data, is_orig, adapter->LastRelDataSeq(),
ip.get(), pkt->cap_len);
}
const struct tcphdr* TCPAnalyzer::ExtractTCP_Header(const u_char*& data, int& len, int& remaining,