ldap: set invalid_data event

Currently in parse_request function LdapEvent::InvalidData is not set when a
request is not parsed correctly.

Ticket #8258
pull/14931/head
Giuseppe Longo 4 months ago committed by Victor Julien
parent 2480f8c038
commit de46f4ba9d

@ -257,6 +257,7 @@ impl LdapState {
return AppLayerResult::incomplete(consumed as u32, needed as u32);
}
Err(_) => {
self.set_event(LdapEvent::InvalidData);
return AppLayerResult::err();
}
}
@ -372,9 +373,7 @@ impl LdapState {
return AppLayerResult::ok();
}
fn parse_request_udp(
&mut self, flow: *mut Flow, stream_slice: StreamSlice,
) -> AppLayerResult {
fn parse_request_udp(&mut self, flow: *mut Flow, stream_slice: StreamSlice) -> AppLayerResult {
let input = stream_slice.as_slice();
let _pdu = Frame::new(
flow,
@ -410,9 +409,7 @@ impl LdapState {
return AppLayerResult::ok();
}
fn parse_response_udp(
&mut self, flow: *mut Flow, stream_slice: StreamSlice,
) -> AppLayerResult {
fn parse_response_udp(&mut self, flow: *mut Flow, stream_slice: StreamSlice) -> AppLayerResult {
let input = stream_slice.as_slice();
if input.is_empty() {
return AppLayerResult::ok();

Loading…
Cancel
Save