]> git.puffer.fish Git - mirror/frr.git/commit
zebra: zebra_nhg check each nexthop for active, not just number 5315/head
authorStephen Worley <sworley@cumulusnetworks.com>
Mon, 11 Nov 2019 23:32:13 +0000 (18:32 -0500)
committerStephen Worley <sworley@cumulusnetworks.com>
Tue, 12 Nov 2019 06:24:39 +0000 (01:24 -0500)
commit148813c22a8df6576ffb69d0ff8c9700630523a0
tree581f3ba2fa8ce05bff77a650765fceb6e506a01d
parentace3bbba4bdeb1c92d69225a54c0149a11340b6c
zebra: zebra_nhg check each nexthop for active, not just number

We were only checking that two nhg_hash_entry's were equal
based on the active nexthop NUMBER. This is not sufficient in
special cases where whats active with one route using it,
might not be active with the other. We can see this with
routes trying to resolve to themselves.

Ex)

1.1.1.0/24
-> 1.1.1.1 dummy1 (inactive)
-> 1.1.1.2 dummy2

1.1.2.0/24
-> 1.1.1.1 dummy1
-> 1.1.1.2 dummy1 (inactive)

Without checking each nexthop individually, they will
hash to the same group since they have the same number of
active nexthops.

Fix this by looping over every nexthop for each nhe (they should
be sorted) and checking if the NEXTHOP_FLAG_ACTIVE flag's match.

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