diff --git a/lib/src/analysis/analyzer.rs b/lib/src/analysis/analyzer.rs index 2a842a5..e436cfc 100644 --- a/lib/src/analysis/analyzer.rs +++ b/lib/src/analysis/analyzer.rs @@ -10,8 +10,8 @@ use crate::{diag::MessagesContainer, gsmtap_parser}; use super::{ connection_redirect_downgrade::ConnectionRedirect2GDowngradeAnalyzer, imsi_requested::ImsiRequestedAnalyzer, information_element::InformationElement, - null_cipher::NullCipherAnalyzer, priority_2g_downgrade::LteSib6And7DowngradeAnalyzer, - nas_null_cipher::NasNullCipherAnalyzer, + nas_null_cipher::NasNullCipherAnalyzer, null_cipher::NullCipherAnalyzer, + priority_2g_downgrade::LteSib6And7DowngradeAnalyzer, }; #[derive(Debug, Clone, Deserialize, Serialize)] @@ -31,7 +31,7 @@ impl Default for AnalyzerConfig { connection_redirect_2g_downgrade: true, lte_sib6_and_7_downgrade: true, null_cipher: true, - nas_null_cipher: true + nas_null_cipher: true, } } } diff --git a/lib/src/analysis/mod.rs b/lib/src/analysis/mod.rs index 46c5ea1..da9571d 100644 --- a/lib/src/analysis/mod.rs +++ b/lib/src/analysis/mod.rs @@ -3,7 +3,7 @@ pub mod connection_redirect_downgrade; pub mod imsi_provided; pub mod imsi_requested; pub mod information_element; -pub mod null_cipher; pub mod nas_null_cipher; +pub mod null_cipher; pub mod priority_2g_downgrade; pub mod util; diff --git a/lib/src/analysis/nas_null_cipher.rs b/lib/src/analysis/nas_null_cipher.rs index 08343c8..64d29bf 100644 --- a/lib/src/analysis/nas_null_cipher.rs +++ b/lib/src/analysis/nas_null_cipher.rs @@ -29,7 +29,9 @@ impl Analyzer for NasNullCipherAnalyzer { } fn get_description(&self) -> Cow { - Cow::from("Tests whether the MME requests to use a null cipher in the security mode command") + Cow::from( + "Tests whether the MME requests to use a null cipher in the security mode command", + ) } fn analyze_information_element(&mut self, ie: &InformationElement) -> Option { @@ -44,15 +46,15 @@ impl Analyzer for NasNullCipherAnalyzer { if let NASMessage::EMMMessage(EMMMessage::EMMSecurityModeCommand(req)) = payload { if req.nas_sec_algo.inner.ciph_algo == EPSEncryptionAlgorithmEEA0Null { - return Some(Event { - event_type: EventType::QualitativeWarning { - severity: Severity::High, - }, - message: format!( - "NAS Security mode command requested null cipher(packet {})", - self.packet_num - ), - }); + return Some(Event { + event_type: EventType::QualitativeWarning { + severity: Severity::High, + }, + message: format!( + "NAS Security mode command requested null cipher(packet {})", + self.packet_num + ), + }); } } None