Commit Graph
6 Commits
Author SHA1 Message Date
ktims 0bd4f8766a Bind session sockets without panicking
Select a random unused source port in the RFC 5881 range (retrying on EADDRINUSE) instead of unwrapping a pure-random bind. Propagate bind errors out of session start-up, store the local IP on the session instead of unwrapping local_addr(), and log (rather than panic on) receive errors in the rx loop.
2026-10-22 15:41:08 -07:00
ktims c7a6ed16e4 Add command line arguments
Replace the hard-coded addresses with clap arguments: --bind <IP> and one or more --peer <IP>. Peers must match the address family of the bind address. Also updates Cargo.lock.
2026-10-22 15:41:08 -07:00
ktims 0bb1f437ae Declare nix dependency
lib.rs and events.rs already use nix; it was missing from Cargo.toml so the crate did not build.
2026-10-22 15:41:08 -07:00
ktims 953f37d1c7 Lots of refactoring and improvements. Script hooks.
Can now establish and hold a session with BIRD, successfully detect Down
state, and call scripts on state change via an event dispatch engine.

Can't maintain a session with VyOS. I think it is calculating the timers
incorrectly, but don't trust my own implementation of course...
2024-10-07 23:56:33 -07:00
ktims 466d6462a4 Basically working version 2024-05-19 15:02:57 -07:00
ktims d00f47d004 Initial commit. Kinda does something. 2024-01-31 00:59:42 -08:00