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

NHG allow recursivity extension #15212

Closed

Conversation

pguibert6WIND
Copy link
Member

This pull request is a simplification from #14973.
Simplification with no sharp command, because the first goal is to make this flag available for BGP first.

This small rework prepares next commit.

Signed-off-by: Philippe Guibert <[email protected]>
In sharpd, configuring a nexthop-group with an IP nexthop that is not
directly connected does not create a NHG context in zebra:

> ubuntu2204(config)# interface loop1
> ubuntu2204(config-if)# ip address 192.0.2.1/24
> ubuntu2204(config-if)# exi
> ubuntu2204(config)# ip route 192.168.0.0/24 192.0.2.100
> ubuntu2204(config)# nexthop-group ABCD
> ubuntu2204(config-nh-group)# nexthop 192.168.0.100
> 2024/01/17 16:36:23 SHARP: [Y2G2F-ZTW6M] nhg_add: nhg 181818169 not sent: no valid nexthops
> ubuntu2204(config-nh-group)# do show nexthop-group rib 181818169
> Nexthop Group ID: 181818169 does not exist

Nexthops with an undefined interface index are neither handled
in ZEBRA, nor in SHARPD.

On the other hand, if we had created a route pointing to the same
nexthop (by using ZEBRA_ROUTE_ADD zapi), the next-hop would have been
installed, thanks to the ALLOW_RECURSION flag embedded in the zapi_route
structure.

Add the support for recursivity in nexthop groups by introducing
a flags attribute in the nexthop group structure. Define the
NEXTHOP_GROUP_ALLOW_RECURSION value, which will be used by ZEBRA to
check for the next-hop group recursivity. This flag is not used by
default.

This flag control is mandatory, as the recursivity may not be allowed
by protocols like eBGP single-hop. Maintain the flag unset by
default.

Signed-off-by: Philippe Guibert <[email protected]>
@pguibert6WIND pguibert6WIND marked this pull request as draft January 30, 2024 16:30
@mjstapp mjstapp self-requested a review February 6, 2024 16:31
@pguibert6WIND
Copy link
Member Author

replaced with #15488

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

Successfully merging this pull request may close these issues.

1 participant