mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2024-11-22 08:16:25 -06:00
ISSUE #501 Apply route overrides TO-FROM and FROM-TO, rather than being order specific. Add a diagnostic output to indicate the override was used.
This commit is contained in:
parent
f4e4c7d226
commit
857f13c0c3
@ -53,9 +53,10 @@ fn walk_node(
|
||||
let to = sites[idx].name.clone();
|
||||
if let Some(route_override) = overrides
|
||||
.iter()
|
||||
.find(|o| o.from_site == from && o.to_site == to)
|
||||
.find(|o| (o.from_site == from && o.to_site == to) || (o.from_site == to && o.to_site == from))
|
||||
{
|
||||
sites[i].route_weights.push((idx, route_override.cost));
|
||||
tracing::info!("Applied route override {} - {}", route_override.from_site, route_override.to_site);
|
||||
} else {
|
||||
sites[i].route_weights.push((idx, weight));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user