diff --git a/src/diagnostic.rs b/src/diagnostic.rs index 820c332..4d0c6c9 100644 --- a/src/diagnostic.rs +++ b/src/diagnostic.rs @@ -720,7 +720,7 @@ impl AnalyzerModule for StyleAnalyzer { impl StyleAnalyzer { /// Analyzes line issues in nftables configuration - /// + /// /// Detects: /// - Lines exceeding maximum length /// - Trailing whitespace at end of lines @@ -768,7 +768,7 @@ impl StyleAnalyzer { } /// Analyzes whitespace issues in nftables configuration - /// + /// /// Detects: /// - Too many consecutive empty lines /// - Trailing empty lines at end of file @@ -935,7 +935,7 @@ impl AnalyzerModule for SemanticAnalyzer { impl SemanticAnalyzer { /// Validates table declarations in nftables configuration - /// + /// /// Checks for: /// - Valid table family (ip, ip6, inet, arp, bridge, netdev) /// - Duplicate table names @@ -1609,5 +1609,14 @@ mod tests { .iter() .any(|d| d.code == DiagnosticCode::InvalidCidrNotation) ); + + // Test edge case: IPv6 minimum prefix + let source_ipv6_zero = "ip6 saddr ::/0 accept"; + let diagnostics_ipv6_zero = analyzer.validate_cidr_notation(source_ipv6_zero); + assert!( + !diagnostics_ipv6_zero + .iter() + .any(|d| d.code == DiagnosticCode::InvalidCidrNotation) + ); } }