Commit d1639730 authored by Robert Ricci's avatar Robert Ricci

Bugfix for non-emulated links - find_best_link() will now only return

a physical link with enough bandwidth for the virtual link. This fixes
some problems with physical nodes that have multiple links of
different speeds.
parent 64e4f41c
......@@ -1254,8 +1254,9 @@ bool find_best_link(pvertex pv,pvertex switch_pv,tb_vlink *vlink,
}
} else {
// For non-emulated links, we're just looking for links with few (0,
// actually) users
if (users < best_users) {
// actually) users, and enough bandwidth
if ((users < best_users) &&
(plink->delay_info.bandwidth >= vlink->delay_info.bandwidth)) {
best_pedge = *pedge_it;
best_distance = distance;
found_best = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment