]> git.proxmox.com Git - mirror_frr.git/commit - zebra/zebra_nhg.c
zebra: use list to mark for removal when scoring
authorStephen Worley <sworley@cumulusnetworks.com>
Tue, 1 Sep 2020 18:53:09 +0000 (14:53 -0400)
committerStephen Worley <sworley@cumulusnetworks.com>
Mon, 28 Sep 2020 16:41:00 +0000 (12:41 -0400)
commit8f830b8c64622099d4a6d3cc12dbc2f8009b45e2
tree67369ed9e4f6b5c7a4e2771c435b4aabff52e41a
parent391c7a3b18c4892313b793740ca3612a67a633d8
zebra: use list to mark for removal when scoring

In scoring our NHEs during shutdown there is a chance we could release mutliple
NHEs at the same time during one iteration. This can cause memory corruption
if the two being released are directly next to each other in the hash table.

hash_iterate accounts for releasing one during the iteration but not
two by setting hbnext before release but if hbnext is also freed,
we obviously can have a problem.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
zebra/zebra_nhg.c