Skip to content

Commit 83f664e

Browse files
committed
chore: some minor changes
1 parent a58e12b commit 83f664e

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

src/bgp/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ impl<S: AsyncRead + AsyncWrite + Unpin> Session<S> {
225225
inst = timers.as_mut().unwrap().tick(), if timers.is_some() => {
226226
timers.as_mut().unwrap().process_tick(inst, stream).await?;
227227
}
228+
result = self.routes.process() => result?,
228229
},
229230
}
230231
Ok(())

src/integration_tests/kernel_linux.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -336,15 +336,15 @@ async fn test_unreachable_routes() -> anyhow::Result<()> {
336336
let ip_routes_exp = ["172.17.254.192/26", "192.0.2.0/27", "fc42::/32"];
337337
let mut ip_routes_exp: Vec<_> = ip_routes_exp
338338
.into_iter()
339-
.map(|x| {
340-
let x = x.parse::<IpPrefix>().unwrap();
339+
.map(|prefix| {
340+
let prefix = prefix.parse::<IpPrefix>().unwrap();
341341
let mut msg = RouteMessageBuilder::<IpAddr>::new()
342-
.destination_prefix(x.prefix(), x.len())
343-
.unwrap()
344342
.kind(RouteType::Unreachable)
345343
.table_id(table_id)
344+
.destination_prefix(prefix.prefix(), prefix.len())
345+
.unwrap()
346346
.build();
347-
if x.is_ipv6() {
347+
if prefix.is_ipv6() {
348348
msg.attributes.push(RouteAttribute::Oif(1));
349349
}
350350
msg

src/kernel/linux/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ impl Kernel for Linux {
122122
if let Some(rtnl) = &mut self.rtnl {
123123
rtnl.process().await
124124
} else {
125+
// TODO: should wait for self.rtnl to fill and exec rtnl.process()
125126
pending().await
126127
}
127128
}

0 commit comments

Comments
 (0)