mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-12 09:33:23 +00:00
Error recovery fixes and routing error rate limiting
- PathBroken handler: convert to async, trigger re-discovery via maybe_initiate_lookup(), reset COORDS_PRESENT warmup counter (was a stub that only invalidated coord_cache) - CoordsRequired recovery timing: reset warmup counter in handle_lookup_response() when discovery completes for an established session, so COORDS_PRESENT packets fire after fresh coords are available (not just on CoordsRequired receipt) - Routing error rate limiting: add RoutingErrorRateLimiter (100ms per-destination, matching ICMP PTB pattern) to gate send_routing_error() at transit nodes - Remove root refresh dead code: the 1800s periodic root re-announcement in check_tree_state() only propagated to depth 1 (sequence-only changes don't cascade). Root loss detection relies on link failure propagation which works correctly.
This commit is contained in:
@@ -170,9 +170,6 @@ impl DiscoveryConfig {
|
||||
/// Spanning tree (`node.tree.*`).
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct TreeConfig {
|
||||
/// Root self-announcement interval in seconds (`node.tree.root_refresh_secs`).
|
||||
#[serde(default = "TreeConfig::default_root_refresh_secs")]
|
||||
pub root_refresh_secs: u64,
|
||||
/// Per-peer TreeAnnounce rate limit in ms (`node.tree.announce_min_interval_ms`).
|
||||
#[serde(default = "TreeConfig::default_announce_min_interval_ms")]
|
||||
pub announce_min_interval_ms: u64,
|
||||
@@ -184,7 +181,6 @@ pub struct TreeConfig {
|
||||
impl Default for TreeConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
root_refresh_secs: 1800,
|
||||
announce_min_interval_ms: 500,
|
||||
parent_switch_threshold: 1,
|
||||
}
|
||||
@@ -192,7 +188,6 @@ impl Default for TreeConfig {
|
||||
}
|
||||
|
||||
impl TreeConfig {
|
||||
fn default_root_refresh_secs() -> u64 { 1800 }
|
||||
fn default_announce_min_interval_ms() -> u64 { 500 }
|
||||
fn default_parent_switch_threshold() -> usize { 1 }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user