Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
northd: make connected routes have higher priority than static
With this patch routes to connected networks have higher priority than static routes with same ip_prefix. This brings commonly-used behaviour for routes lookup order: 1: longest prefix match 2: metric The metric has next lookup order: 1: connected routes 2: static routes Earlier static and connected routes with same ip_prefix had the same priority, so it was impossible to predict which one is used for routing decision. Each route's prefix length has its own 'slot' in lflow prios. Now prefix length space is calculated using next information: to calculate route's priority prefixlen multiplied by 3 + route origin offset (0 - source-based route; 1 - static route; 2 - directly-connected route2). Also, enlarge prio for generic records in lr_in_ip_routing stage by 10000. Signed-off-by: Vladislav Odintsov <odivlad@gmail.com> Signed-off-by: Numan Siddique <numans@ovn.org>
- Loading branch information
1 parent
9ce8151
commit b0d9f46
Showing
3 changed files
with
53 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters