summaryrefslogtreecommitdiff
path: root/pbrd/pbr_nht.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2019-06-24 14:04:13 -0400
committerStephen Worley <sworley@cumulusnetworks.com>2019-06-25 22:58:48 -0400
commit50d8965075cf59744dde685ae01400d9b7ee08a2 (patch)
tree576f96ef1806522cfc2e8d7af5f2b61605daecc1 /pbrd/pbr_nht.c
parent504d0a409627e21167233e538dbc49af59fbdd99 (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 'pbrd/pbr_nht.c')
-rw-r--r--pbrd/pbr_nht.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/pbrd/pbr_nht.c b/pbrd/pbr_nht.c
index 22dd6f1a38..a69bb00848 100644
--- a/pbrd/pbr_nht.c
+++ b/pbrd/pbr_nht.c
@@ -21,7 +21,8 @@
#include <log.h>
#include <nexthop.h>
-#include <nexthop_group.h>
+#include "nexthop_group.h"
+#include "nexthop_group_private.h"
#include <hash.h>
#include <jhash.h>
#include <vty.h>
@@ -576,7 +577,7 @@ void pbr_nht_delete_individual_nexthop(struct pbr_map_sequence *pbrms)
hash_release(pbr_nhg_hash, pnhgc);
- nexthop_del(pbrms->nhg, nh);
+ _nexthop_del(pbrms->nhg, nh);
nexthop_free(nh);
nexthop_group_delete(&pbrms->nhg);
XFREE(MTYPE_TMP, pbrms->internal_nhg_name);
@@ -723,7 +724,7 @@ static void pbr_nexthop_group_cache_iterate_to_group(struct hash_bucket *b,
copy_nexthops(&nh, pnhc->nexthop, NULL);
- nexthop_add(&nhg->nexthop, nh);
+ _nexthop_add(&nhg->nexthop, nh);
}
static void