]> git.puffer.fish Git - matthieu/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>
Thu, 26 Mar 2020 14:48:15 +0000 (10:48 -0400)
commit497ff5792f6a27702bf4ee33b79e1a80ffcf0a09
treef01926c2a6c06453f25db3a0e83a6f6e0368ed04
parentb37bbdbc8107abeb988939ab79b3d4f68adf9981
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>
zebra/zebra_nhg.c