From 50d8965075cf59744dde685ae01400d9b7ee08a2 Mon Sep 17 00:00:00 2001 From: Stephen Worley Date: Mon, 24 Jun 2019 14:04:13 -0400 Subject: 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 --- pbrd/pbr_vty.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pbrd/pbr_vty.c') diff --git a/pbrd/pbr_vty.c b/pbrd/pbr_vty.c index a71c712ea..95f38563b 100644 --- a/pbrd/pbr_vty.c +++ b/pbrd/pbr_vty.c @@ -25,6 +25,7 @@ #include "vrf.h" #include "nexthop.h" #include "nexthop_group.h" +#include "nexthop_group_private.h" #include "log.h" #include "debug.h" #include "pbr.h" @@ -329,7 +330,7 @@ DEFPY(pbr_map_nexthop, pbr_map_nexthop_cmd, nh = nexthop_new(); memcpy(nh, &nhop, sizeof(nhop)); - nexthop_add(&pbrms->nhg->nexthop, nh); + _nexthop_add(&pbrms->nhg->nexthop, nh); pbr_nht_add_individual_nexthop(pbrms); pbr_map_check(pbrms); -- cgit v1.2.3