]> git.proxmox.com Git - mirror_frr.git/commit
zebra: Use curr_active to check multipath_num
authorStephen Worley <sworley@cumulusnetworks.com>
Thu, 21 Nov 2019 20:27:12 +0000 (15:27 -0500)
committerStephen Worley <sworley@cumulusnetworks.com>
Thu, 21 Nov 2019 20:27:12 +0000 (15:27 -0500)
commit08de78b876070eab4a358d262e23095fe973437a
tree6f17fd934a8d82bb01170dbf6288b65723191837
parent2d7ef3bba7eeb00adf2aceeca4747b59f4ac5fc7
zebra: Use curr_active to check multipath_num

We were re-counting the entire group's active number on
every iteration of this nexthop_active_update() loop.

This is not great from a performance perspective but also
it was failing to properly mark things according to the
specified multipath_num.

Since a nexthop is set as active before this check, if its == to
the set ecmp, it gets marked inactive even though if its
under the max ecmp wanted!

ex)

set ecmp to 1.
`/usr/lib/frr/zebra -e 1`

All kernel routes will be marked inactive even with just one nexthop!

K   1.1.1.1/32 [0/0] is directly connected, dummy1 inactive, 00:00:10
K   1.1.1.2/32 [0/0] is directly connected, dummy2 inactive, 00:00:10
K   1.1.1.3/32 [0/0] is directly connected, dummy3 inactive, 00:00:10
K   1.1.1.4/32 [0/0] is directly connected, dummy4 inactive, 00:00:10
K   1.1.1.5/32 [0/0] is directly connected, dummy5 inactive, 00:00:10
K   1.1.1.6/32 [0/0] is directly connected, dummy6 inactive, 00:00:10
K   1.1.1.7/32 [0/0] is directly connected, dummy7 inactive, 00:00:10
K   1.1.1.8/32 [0/0] is directly connected, dummy8 inactive, 00:00:10
K   1.1.1.9/32 [0/0] is directly connected, dummy9 inactive, 00:00:10

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