gsliepen / tinc

a VPN daemon
http://tinc-vpn.org/
Other
1.93k stars 283 forks source link

Fix weight comparison in edge BFS #394

Closed hg closed 2 years ago

hg commented 2 years ago

re #393

I'm guessing BFS could be replaced with a more effective algorithm? I wanted to model a large-ish network with dozens of edges, but it quickly became obvious sssp_bfs() doesn't pick the most efficient route in complex cases. So this PR comes with a minimal test only to reproduce this issue.