-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Mrib nht wonky #17254
Conversation
@Mergifyio backport dev/10.2 |
✅ Backports have been created
|
4fa8876
to
5a1c2d0
Compare
zebra/zebra_rib.c
Outdated
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); | ||
} | ||
|
There was a problem hiding this comment.
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
There was a problem hiding this 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>
5a1c2d0
to
3bff65a
Compare
Mrib nht wonky (backport #17254)
No description provided.