mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 01:28:20 +00:00
Extend PIA's FirstPacket
API.
`FirstPacket()` so far supported only TCP. To extend this to UDP, we move the method into the PIA base class; give it a protocol parameter for the case that there's no actual packet is available; and add the ability to create fake UDP packets as well, not just TCP. This whole thing is pretty ugly to begin with, and this doesn't make it nicer, but we need this extension that so we can feed UDP data into the signature engine that's tunneled over other protocols. Without the fake packets, DPD signatures in particular wouldn't have anything to match on.
This commit is contained in:
parent
8dd3debeae
commit
2ec44f098f
6 changed files with 137 additions and 57 deletions
|
@ -357,8 +357,8 @@ void SSL_Analyzer::ForwardDecryptedData(const std::vector<u_char>& data, bool is
|
|||
if ( ! pia ) {
|
||||
pia = new analyzer::pia::PIA_TCP(Conn());
|
||||
if ( AddChildAnalyzer(pia) ) {
|
||||
pia->FirstPacket(true, nullptr);
|
||||
pia->FirstPacket(false, nullptr);
|
||||
pia->FirstPacket(true, TransportProto::TRANSPORT_TCP);
|
||||
pia->FirstPacket(false, TransportProto::TRANSPORT_TCP);
|
||||
}
|
||||
else
|
||||
reporter->Error("Could not initialize PIA");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue