diff --git a/rust/src/ike/ike.rs b/rust/src/ike/ike.rs index 97d6b5e85d..87214c8a2f 100644 --- a/rust/src/ike/ike.rs +++ b/rust/src/ike/ike.rs @@ -217,13 +217,12 @@ impl IKEState { } if isakmp_header.maj_ver == 1 { - handle_ikev1(self, current, isakmp_header, direction); + return handle_ikev1(self, current, isakmp_header, direction); } else if isakmp_header.maj_ver == 2 { - handle_ikev2(self, current, isakmp_header, direction); + return handle_ikev2(self, current, isakmp_header, direction); } else { return AppLayerResult::err(); } - return AppLayerResult::ok(); // todo either remove outer loop or check header length-field if we have completely read everything } Err(Err::Incomplete(_)) => { SCLogDebug!("Insufficient data while parsing IKE");