When we copy a new nexthop to cache and track, set its
next and prev pointers to NULL. We don't want those since
this is to be treated as a single nexthop.Other nexthops that
aren't in a group could hash to this nexthop so it doesn't
make sense to keep those pointers in the cache.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
{
struct nhrc *nhrc = XCALLOC(MTYPE_PBR_NHG, sizeof(struct nhrc));
nhrc->nexthop = *(struct nexthop *)p;
+ nhrc->nexthop.next = NULL;
+ nhrc->nexthop.prev = NULL;
return nhrc;
}