mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 16:04:49 +00:00
pbrd: Set next/prev to NULL on cached nexthops
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>
This commit is contained in:
parent
82e16a13e5
commit
ad9255f8fe
@ -66,6 +66,8 @@ static void *pbr_nhrc_hash_alloc(void *p)
|
|||||||
{
|
{
|
||||||
struct nhrc *nhrc = XCALLOC(MTYPE_PBR_NHG, sizeof(struct nhrc));
|
struct nhrc *nhrc = XCALLOC(MTYPE_PBR_NHG, sizeof(struct nhrc));
|
||||||
nhrc->nexthop = *(struct nexthop *)p;
|
nhrc->nexthop = *(struct nexthop *)p;
|
||||||
|
nhrc->nexthop.next = NULL;
|
||||||
|
nhrc->nexthop.prev = NULL;
|
||||||
return nhrc;
|
return nhrc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user