]> git.proxmox.com Git - mirror_frr.git/commit - zebra/zebra_nhg.h
zebra: Prevent duplication and overflow in nhe2grp
authorStephen Worley <sworley@cumulusnetworks.com>
Thu, 25 Jul 2019 17:27:59 +0000 (13:27 -0400)
committerStephen Worley <sworley@cumulusnetworks.com>
Fri, 25 Oct 2019 15:13:41 +0000 (11:13 -0400)
commit8dbc800f42797105b53fd385eb57ac30bc372d7d
tree8702bb8ef891fd054b4551f10211ecf933a0a5ab
parent4b87c90d58a04650d8bc4316115c3233236431a0
zebra: Prevent duplication and overflow in nhe2grp

The kernel does not allow duplicate IDs in the same group, but
we are perfectly find with it internally if two different
nexthops resolve the the same nexthop (default route for instance).
So, we have to handle this when we get ready to install.

Further, pass the max group size in the arguments to ensure we
don't overflow. Don't actually think this is possible due to
multipath checking in nexthop_active_update() but better to be
safe.

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