diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2024-08-29 18:10:30 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2024-08-29 18:10:30 -0400 |
| commit | 8ad5643abe59d1f60b6efcdd61fe4f9195b2dde8 (patch) | |
| tree | 5e4f3fe982db2ff28bfc05934a5fd37bc07dd893 /zebra/zebra_rib.c | |
| parent | c0f49724327fd858ed28df9c02c17e2af4b3fe4c (diff) | |
zebra: Convince SA that the ng will always be valid
There is a code path that could theoretically get you
to a point where the ng->nexthop is a NULL value.
Let's just make sure the SA system believes that
cannot happen anymore.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index b4baee148a..de8af3c9df 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -4413,7 +4413,8 @@ int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p, return -1; } - if (ifp->ifindex == ng->nexthop->ifindex) + if (ng && ng->nexthop && + ifp->ifindex == ng->nexthop->ifindex) re->type = ZEBRA_ROUTE_CONNECT; } } |
