Open ashkan-moghadasi opened 1 year ago
Hello @ashkan-moghadasi, thank you very much for reporting. It's been a while since I was working on this project (I always wanted to write a blog post about writing software router in .NET). I have to admit I don't have prepared a laboratory to test such use-case. Feel free to offer a PR with some experimental proof.
Our routing algorithm must prefer more specific routes as the best route of routing algorithm however I think you act vice versa in RoutingTable.Resolve()
if (bestRoute == null || bestRoute.NetworkMask.ToInt() > route.NetworkMask.ToInt()) { bestRoute = route; } Must Be
if (bestRoute == null || bestRoute.NetworkMask.ToInt()< route.NetworkMask.ToInt()) { bestRoute = route; }