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

Mrib nht wonky #17254

Merged
merged 3 commits into from
Oct 28, 2024
Merged

Mrib nht wonky #17254

merged 3 commits into from
Oct 28, 2024

Conversation

donaldsharp
Copy link
Member

No description provided.

@Jafaral
Copy link
Member

Jafaral commented Oct 26, 2024

@Mergifyio backport dev/10.2

Copy link

mergify bot commented Oct 26, 2024

backport dev/10.2

✅ Backports have been created

Comment on lines 1251 to 1260
struct rib_table_info *info = NULL;
vrf_id_t vrf_id = VRF_UNKNOWN;

if (IS_ZEBRA_DEBUG_RIB || IS_ZEBRA_DEBUG_RIB_DETAILED) {
info = srcdest_rnode_table_info(rn);
assert(info);
}

Copy link
Member

@Jafaral Jafaral Oct 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think info can be null, but SA isn't smart enough to realize that:

https://ci1.netdef.org/browse/FRR-PULLREQ3-STATICANALYZER-5787

However, to avoid adding a false positive, and since we only care about what safi we have below, I suggest to pull that value here and use it below without using info afterwards.

        safi_t safi = -1;

	if (IS_ZEBRA_DEBUG_RIB || IS_ZEBRA_DEBUG_RIB_DETAILED) {
	        struct rib_table_info *info;
		info = srcdest_rnode_table_info(rn);
		if (info)
                   safi = info->safi
	}

use safi below instead of info->safi

Copy link
Member

@ton31337 ton31337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation update?

Nothing special here, just allow sharpd to ask to watch
nexthops in the mrib.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Trying to figure out what safi we are talking about is fun when
it is not put into the debugs.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Currently the mroute code was not allowing the mroute
to be sent to the dataplane.  This leaves us with a
situation where the routes being installed where never
being set as installed and additionally nht against
the mrib would not work if the route came into existence
after the nexthop tracking was asked for.

Turns out all the pieces where there to let this work.
Modify the code to pass it to the dplane and to send
it back up as having worked.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
@github-actions github-actions bot added size/L and removed size/M labels Oct 28, 2024
@Jafaral Jafaral merged commit 2945258 into FRRouting:master Oct 28, 2024
11 checks passed
Jafaral added a commit that referenced this pull request Oct 30, 2024
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.

3 participants