]> git.puffer.fish Git - mirror/frr.git/commit
zebra: handle NHG in NHG dataplane group conversion
authorStephen Worley <sworley@cumulusnetworks.com>
Tue, 28 Jan 2020 00:36:01 +0000 (19:36 -0500)
committerStephen Worley <sworley@cumulusnetworks.com>
Fri, 3 Apr 2020 19:00:23 +0000 (15:00 -0400)
commit31be02111fce3d6111965cec72db4d36eafbba06
tree672defe63ee2602f213028c508b6753aabdfcaba
parent61cc86b1bbc6e6f2079b478a9dd060542b69ce17
zebra: handle NHG in NHG dataplane group conversion

We were not properly handling the case of a NHG inside of
another NHG when converting the rb tree of a multilevel NHG
into a flat list of IDs. When constructing, we call the function
zebra_nhg_nhe2grp_internal() recursively so that the rare
case of a group within a group is handled such that its
singleton nexthops are appended to the grp array of IDs
we send to the dataplane code.

Ex)

1:
-> 2:
-> 3
-> 4
->5:
->6

becomes this:

1:
->3
->4
->6

when its sent to the dataplane code for final kernel installation.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
(cherry picked from commit 497ff5792f6a27702bf4ee33b79e1a80ffcf0a09)
zebra/zebra_nhg.c