]> git.proxmox.com Git - mirror_frr.git/commit - zebra/zebra_nhg.c
zebra: Move id counter into zebra_nhg_find()
authorStephen Worley <sworley@cumulusnetworks.com>
Thu, 28 Mar 2019 19:20:29 +0000 (15:20 -0400)
committerStephen Worley <sworley@cumulusnetworks.com>
Fri, 25 Oct 2019 15:13:38 +0000 (11:13 -0400)
commit5bd81e4c915b1620e4d190f4b688cf10c53429c5
treecbdc9484e1635a41497d6eaa9d457df86938614f
parentfdee485ad02197b9ef020b0a25d09cbb4e639b06
zebra: Move id counter into zebra_nhg_find()

Move the id counter further up into zebra_nhg_find() so that
it is still incremented if we receive a duplicate that never
would get allocated. The kernel will still use the dup, so we
have to account for that in our id counter.

Also, if we don't create a new entry, reset the id back to where
it was when zebra_nhg_find() was called.

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