diff options
| author | Stephen Worley <sworley@cumulusnetworks.com> | 2019-06-24 14:04:13 -0400 |
|---|---|---|
| committer | Stephen Worley <sworley@cumulusnetworks.com> | 2019-06-25 22:58:48 -0400 |
| commit | 50d8965075cf59744dde685ae01400d9b7ee08a2 (patch) | |
| tree | 576f96ef1806522cfc2e8d7af5f2b61605daecc1 /zebra/zebra_rib.c | |
| parent | 504d0a409627e21167233e538dbc49af59fbdd99 (diff) | |
lib: Private api for nexthop_group manipulation
Add a file that exposes functions which modify nexthop groups.
Nexthop groups are techincally immutable but there are a
few special cases where we need direct access to add/remove
nexthops after the group has been made. This file provides a
way to expose those functions in a way that makes it clear
this is a private/hidden api.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 2df24f75c5..5b0ca6570e 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -36,6 +36,7 @@ #include "thread.h" #include "vrf.h" #include "workqueue.h" +#include "nexthop_group_private.h" #include "zebra/zebra_router.h" #include "zebra/connected.h" @@ -192,7 +193,7 @@ int zebra_check_addr(const struct prefix *p) /* Add nexthop to the end of a rib node's nexthop list */ void route_entry_nexthop_add(struct route_entry *re, struct nexthop *nexthop) { - nexthop_add(&re->ng.nexthop, nexthop); + _nexthop_add(&re->ng.nexthop, nexthop); re->nexthop_num++; } @@ -1589,7 +1590,7 @@ static bool rib_update_re_from_ctx(struct route_entry *re, */ nexthop = nexthop_new(); nexthop->type = NEXTHOP_TYPE_IPV4; - nexthop_add(&(re->fib_ng.nexthop), nexthop); + _nexthop_add(&(re->fib_ng.nexthop), nexthop); } done: |
