Start cleanup
Some checks failed
Rust / build (push) Has been cancelled

This commit is contained in:
Rayhaan Jaufeerally
2025-01-01 13:03:02 +01:00
parent b0f2995ed8
commit 3b41e64650
4 changed files with 25 additions and 4 deletions

View File

@ -88,7 +88,7 @@ where
/// route_add requests updating the nexthop to a particular path if it is not already
/// the best path.
pub async fn route_add(&mut self, nlri: &NLRI, nexthop: IpAddr) -> Result<()> {
info!(af = ?self.af, %nlri, %nexthop);
trace!(af = ?self.af, %nlri, %nexthop);
// Lookup the path in the Fib, there are three possible outcomes:
// 1. The route is not yet known, we add it to the FibState and inject it into the kernel,
// 2. The route is known and has a prior nexthop that needs to be updated

View File

@ -139,13 +139,12 @@ impl NetlinkConnector {
pub async fn dump_routes(
&mut self,
address_family: AddressFamilyIdentifier,
table: Option<u32>,
) -> Result<Vec<RouteMessage>, rtnetlink::Error> {
let mut req = self.handle.route().get(match address_family {
AddressFamilyIdentifier::Ipv4 => IpVersion::V4,
AddressFamilyIdentifier::Ipv6 => IpVersion::V6,
});
if let Some(table_id) = table {
if let Some(table_id) = self.table {
req.message_mut()
.attributes
.push(RouteAttribute::Table(table_id));