mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-10 08:37:02 +00:00
Session 43: CLI config option and state machine design
Add command-line argument parsing with clap: - -c/--config option to specify config file path - Overrides default search path when provided - Proper error handling for missing/invalid files Improve logging: - Peer connection log now uses separate log entries per field - Better readability with aligned timestamps Fix ICMPv6 error handling: - Add multicast destination filter to should_send_icmp_error() - Router Solicitation packets (ff02::2) now silently dropped - Add test case for multicast destination Add phase-based state machine design document: - Document pattern where lifecycle phases use distinct structs in enum - PeerSlot::Connecting(PeerConnection) -> PeerSlot::Active(ActivePeer) - Benefits: type safety, memory efficiency, security - Describes timeout handling and lookup table requirements
This commit is contained in:
+6
-9
@@ -424,15 +424,12 @@ impl Node {
|
||||
.map(|a| format!(" ({})", a))
|
||||
.unwrap_or_default();
|
||||
|
||||
info!(
|
||||
npub = %peer_config.npub,
|
||||
node_id = %peer_node_id,
|
||||
transport = %addr.transport,
|
||||
addr = %addr.addr,
|
||||
link_id = %link_id,
|
||||
"Peer connection initiated{}",
|
||||
alias_display
|
||||
);
|
||||
info!("Peer connection initiated{}", alias_display);
|
||||
info!(" npub: {}", peer_config.npub);
|
||||
info!(" node_id: {}", peer_node_id);
|
||||
info!(" transport: {}", addr.transport);
|
||||
info!(" addr: {}", addr.addr);
|
||||
info!(" link_id: {}", link_id);
|
||||
|
||||
self.peers.insert(peer_node_id, peer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user