Skip to content

Commit

Permalink
Merge pull request #16692 from donaldsharp/zebra_avoid_ng_null
Browse files Browse the repository at this point in the history
zebra: Convince SA that the ng will always be valid
  • Loading branch information
Jafaral authored Aug 30, 2024
2 parents c0f4972 + 8ad5643 commit 6bfd311
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zebra/zebra_rib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 6bfd311

Please sign in to comment.