diff --git a/CHANGELOG.md b/CHANGELOG.md index 8879e461..67da3bd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Size of data packets is limited to 65535 bytes. - Update interval is now expressed as centiseconds, in accordance with the babel RFC. +- Update filters now allow retractions for a route from any router-id. ### Fixed diff --git a/src/filters.rs b/src/filters.rs index 35b7123d..516aeb04 100644 --- a/src/filters.rs +++ b/src/filters.rs @@ -38,12 +38,16 @@ impl RouteUpdateFilter for AllowedSubnet { } /// Limit the announced subnets to those which contain the derived IP from the `RouterId`. +/// +/// Since retractions can be sent by any node to indicate they don't have a route for the subnet, +/// these are also allowed. pub struct RouterIdOwnsSubnet; impl RouteUpdateFilter for RouterIdOwnsSubnet { fn allow(&self, update: &babel::Update) -> bool { - update - .subnet() - .contains_ip(update.router_id().to_pubkey().address().into()) + update.metric().is_infinite() + || update + .subnet() + .contains_ip(update.router_id().to_pubkey().address().into()) } }