-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bgpd: fix nhg loop in bgp_default_originate() test.
The bgp_default_originate test fails. The ZEBRA daemon goes in OOM, since he keeps looping over the resolution of a NHG which is updated. When sending a route with recursive resolution to ZEBRA, ZEBRA performs some checks with the prefix that are not available when pushing only the NHG: to avoid resolving over a same prefix, the nexthop_active() function compares the prefix to install with the current path used to validate the prefix, and invalidates the route when this occurs. Similarly, if the path to resolve is a default route, the control is left to ZEBRA, and this detection must be done recursively, when parsing the paths of the prefix to install. To avoid all those corner cases, BGP will detect when a path is resolved over a default route, or when a path resolves over its own prefix, and will use the regular ROUTE_ADD/ROUTE_DELETE instead of using the NHG approach. Fixes: b98caac ("sharpd, zebra, lib, doc: add recursive support for protocol nhid") Signed-off-by: Philippe Guibert <[email protected]>
- Loading branch information
1 parent
a56e709
commit e1db302
Showing
4 changed files
with
131 additions
and
0 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
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