Make BinPAC exception handling more consistent

This commit is contained in:
Vlad Grigorescu 2018-05-02 15:39:43 -05:00
parent 5572d05921
commit ceab58c17e
6 changed files with 6 additions and 7 deletions

View file

@ -33,7 +33,7 @@ void KRB_Analyzer::DeliverPacket(int len, const u_char* data, bool orig,
}
catch ( const binpac::Exception& e )
{
ProtocolViolation(e.c_msg());
ProtocolViolation(fmt("Binpac exception: %s", e.c_msg()));
}
}

View file

@ -53,7 +53,7 @@ void KRB_Analyzer::DeliverStream(int len, const u_char* data, bool orig)
}
catch ( const binpac::Exception& e )
{
ProtocolViolation(e.c_msg());
ProtocolViolation(fmt("Binpac exception: %s", e.c_msg()));
}
}

View file

@ -53,7 +53,7 @@ void MySQL_Analyzer::DeliverStream(int len, const u_char* data, bool orig)
}
catch ( const binpac::Exception& e )
{
reporter->Weird(e.msg().c_str());
ProtocolViolation(fmt("Binpac exception: %s", e.c_msg()));
}
}

View file

@ -40,7 +40,7 @@ void NCP_Session::Deliver(int is_orig, int len, const u_char* data)
}
catch ( const binpac::Exception& e )
{
analyzer->Weird(e.msg().c_str());
analyzer->ProtocolViolation(fmt("Binpac exception: %s", e.c_msg()));
}
}

View file

@ -55,8 +55,7 @@ void SIP_Analyzer::DeliverStream(int len, const u_char* data, bool orig)
}
catch ( const binpac::Exception& e )
{
printf("BinPAC Exception: %s\n", e.c_msg());
ProtocolViolation(e.c_msg());
ProtocolViolation(fmt("Binpac exception: %s", e.c_msg()));
}
}

View file

@ -35,6 +35,6 @@ void SNMP_Analyzer::DeliverPacket(int len, const u_char* data, bool orig,
}
catch ( const binpac::Exception& e )
{
ProtocolViolation(e.c_msg());
ProtocolViolation(fmt("Binpac exception: %s", e.c_msg()));
}
}