Conversation
| ) | ||
| .bright_black()); | ||
| owo_println!("---------------"); | ||
| print_couldnt_bind_solution(500, &e)?; |
Check warning
Code scanning / clippy
this expression creates a reference which is immediately dereferenced by the compiler Warning
|
|
||
| async fn main_both(cli: &Cli) -> Result<(), Box<dyn std::error::Error>> { | ||
| owo_println!("Starting scan for IKEv2, then scanning IKEv1..."); | ||
| main_v2(&cli).await?; |
Check warning
Code scanning / clippy
this expression creates a reference which is immediately dereferenced by the compiler Warning
| } else { | ||
| None | ||
| }; | ||
| main_v1(&cli).await?; |
Check warning
Code scanning / clippy
this expression creates a reference which is immediately dereferenced by the compiler Warning
| } | ||
| ControlChannelEvent::DumpState(ch) => { | ||
| let dump = dump_state(&mut open, &mut todo, &mut stats, &mut results, &options, &scan_started); | ||
| ch.send(dump).expect("can't send state dump via channel") |
Check warning
Code scanning / clippy
used expect() on a Result value Warning
| #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] | ||
| pub struct CertificateRequest { | ||
| pub encoding: CertificateEncoding, | ||
| pub certification_authority: Vec<u8>, |
Check warning
Code scanning / clippy
missing documentation for a struct field Warning
| /// For this representation, these are not parsed and provided as [`Vec<u8>`] instead. | ||
| #[derive(Debug, PartialEq, Serialize, Deserialize)] | ||
| pub struct Notification { | ||
| pub variant: NotificationType, |
Check warning
Code scanning / clippy
missing documentation for a struct field Warning
| #[derive(Debug, PartialEq, Serialize, Deserialize)] | ||
| pub struct Notification { | ||
| pub variant: NotificationType, | ||
| pub data: Vec<u8>, |
Check warning
Code scanning / clippy
missing documentation for a struct field Warning
| pub struct Notification { | ||
| pub variant: NotificationType, | ||
| pub data: Vec<u8>, | ||
| pub protocol: SecurityProtocol, |
Check warning
Code scanning / clippy
missing documentation for a struct field Warning
| pub variant: NotificationType, | ||
| pub data: Vec<u8>, | ||
| pub protocol: SecurityProtocol, | ||
| pub spi: Option<Vec<u8>>, |
Check warning
Code scanning / clippy
missing documentation for a struct field Warning
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive IKEv2 support to the ISAKMP library and ikebuster tool, expanding the existing IKEv1 functionality to support the newer IKE protocol version.
Key changes:
- Complete IKEv2 protocol implementation with parsers, generators, and data structures
- New IKEv2 scanner functionality with improved proposal testing and connection tracking
- Enhanced CLI with autodetection, mode selection, and improved output formats
Reviewed Changes
Copilot reviewed 44 out of 45 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| setup.md | Adds logging configuration documentation for Libreswan |
| isakmp/src/v2/ | Complete IKEv2 implementation with definitions, parsers, generators, and utilities |
| isakmp/src/v1/ | Minor fixes to comments and naming in existing IKEv1 code |
| isakmp/src/lib.rs | Exposes new v2 module |
| ikebuster/src/v2/ | New IKEv2 scanner implementation with advanced features |
| ikebuster/src/main.rs | Extended CLI with multiple scan modes and IKEv2 support |
| ikebuster/src/lib.rs | Version detection and shared networking utilities |
Comments suppressed due to low confidence (1)
isakmp/src/v1/definitions/mod.rs:1
- Corrected spelling of 'TrippleDES_CBC' to 'TripleDES_CBC'
//! Definitions of ISAKMP messages and types
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| .encryption_algorithms | ||
| .iter_mut() | ||
| .for_each(|e| e.1 = None); | ||
| for mut p in open_proposals { |
There was a problem hiding this comment.
Don't use mut p in xyz, modern Rust likes to have: p in &mut xyz
There was a problem hiding this comment.
I consume open_proposals, and thus I'd say mut p is acceptable
| ) { | ||
| if let Some(&sa) = open_packet | ||
| .payloads | ||
| .iter() |
There was a problem hiding this comment.
use into_iter, you have ownership
… doesn't hurt much
It mandates that the nonce is at least the key size of the PRF, which is at most 512 bits for SHA512.
This PR adds IKEv2 support to the ISAKMP library and the
ikebustertool.It may need fine-tuning here and there, but it works overall.