forked from M-Labs/nac3
1
0
Fork 0

drtio: demote default routing table message to info

This commit is contained in:
Sebastien Bourdeauducq 2022-03-16 21:04:12 +08:00
parent 0530e596ba
commit ebdb08180d
1 changed files with 5 additions and 8 deletions

View File

@ -58,20 +58,17 @@ impl fmt::Display for RoutingTable {
pub fn config_routing_table(default_n_links: usize, cfg: &Config) -> RoutingTable { pub fn config_routing_table(default_n_links: usize, cfg: &Config) -> RoutingTable {
let mut ret = RoutingTable::default_master(default_n_links); let mut ret = RoutingTable::default_master(default_n_links);
if let Ok(data) = cfg.read("routing_table") { if let Ok(data) = cfg.read("routing_table") {
if data.len() == DEST_COUNT*MAX_HOPS if data.len() == DEST_COUNT*MAX_HOPS {
{
for i in 0..DEST_COUNT { for i in 0..DEST_COUNT {
for j in 0..MAX_HOPS { for j in 0..MAX_HOPS {
ret.0[i][j] = data[i*MAX_HOPS+j]; ret.0[i][j] = data[i*MAX_HOPS+j];
} }
} }
} else {
warn!("length of the configured routing table is incorrect, using default");
} }
else { } else {
warn!("length of the routing table is incorrect, using default"); info!("could not read routing table from configuration, using default");
}
}
else {
warn!("could not read routing table from configuration, using default");
} }
info!("routing table: {}", ret); info!("routing table: {}", ret);
ret ret