diff options
| author | Stephen Worley <sworley@cumulusnetworks.com> | 2020-01-13 13:29:58 -0500 |
|---|---|---|
| committer | Stephen Worley <sworley@cumulusnetworks.com> | 2020-01-15 13:35:04 -0500 |
| commit | 77bf9504bfcdb977cda2addca27254e22be52f2f (patch) | |
| tree | 874f0c4118ceafffeafd6c25cd833060f1276a60 /lib/nexthop_group.c | |
| parent | 0fff714efa1959f48c8e1d88e88968d15c1ffe78 (diff) | |
lib,zebra: tighten up the nexthop_copy/nexthop_dup APIs
Make the nexthop_copy/nexthop_dup APIs more consistent by
adding a secondary, non-recursive, version of them. Before,
it was inconsistent whether the APIs were expected to copy
recursive info or not. Make it clear now that the default is
recursive info is copied unless the _no_recurse() version is
called. These APIs are not heavily used so it is fine to
change them for now.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'lib/nexthop_group.c')
| -rw-r--r-- | lib/nexthop_group.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/nexthop_group.c b/lib/nexthop_group.c index 0051cba625..0f1a87cf6e 100644 --- a/lib/nexthop_group.c +++ b/lib/nexthop_group.c @@ -363,10 +363,6 @@ void copy_nexthops(struct nexthop **tnh, const struct nexthop *nh, for (nh1 = nh; nh1; nh1 = nh1->next) { nexthop = nexthop_dup(nh1, rparent); _nexthop_add(tnh, nexthop); - - if (CHECK_FLAG(nh1->flags, NEXTHOP_FLAG_RECURSIVE)) - copy_nexthops(&nexthop->resolved, nh1->resolved, - nexthop); } } |
