mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 21:18:20 +00:00
Change binpac exceptions in AYIYA/GTP analyzers to do protocol_violation
As opposed to creating weirds for e.g. "binpac::ExceptionOutOfBound". The protocol_violation will also result in the disabling of the analyzer by default.
This commit is contained in:
parent
3e7fb3a659
commit
7cf54b2541
2 changed files with 17 additions and 2 deletions
|
@ -20,5 +20,12 @@ void GTPv1_Analyzer::Done()
|
|||
void GTPv1_Analyzer::DeliverPacket(int len, const u_char* data, bool orig, int seq, const IP_Hdr* ip, int caplen)
|
||||
{
|
||||
Analyzer::DeliverPacket(len, data, orig, seq, ip, caplen);
|
||||
interp->NewData(orig, data, data + len);
|
||||
try
|
||||
{
|
||||
interp->NewData(orig, data, data + len);
|
||||
}
|
||||
catch ( const binpac::Exception& e )
|
||||
{
|
||||
ProtocolViolation(fmt("Binpac exception: %s", e.c_msg()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue