Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should route by longest prefix match #15

Open
ambrop72 opened this issue Nov 16, 2017 · 1 comment
Open

Should route by longest prefix match #15

ambrop72 opened this issue Nov 16, 2017 · 1 comment

Comments

@ambrop72
Copy link

Route lookup should return the longest prefix match in case of more than one match. See https://en.wikipedia.org/wiki/Longest_prefix_match and https://www.rfc-editor.org/rfc/rfc1812.txt (look for "Longest Match").

if ((daddr & rt->netmask) == (rt->dst & rt->netmask)) break;

@y4hu
Copy link

y4hu commented Oct 27, 2018

Fixed in #20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants