summaryrefslogtreecommitdiff
path: root/bgpd/bgp_flowspec_vty.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-03-22 00:02:18 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2020-03-26 16:25:16 -0400
commitb54892e0ea247f52beea96855734919f80de5217 (patch)
treeb76b8a7899121ff14334dd7773d335b8b8b705d2 /bgpd/bgp_flowspec_vty.c
parent5f040085bad9cff365fe4bed0696ccf7494840b5 (diff)
bgpd: Convert users of `rn->p` to use accessor function
Add new function `bgp_node_get_prefix()` and modify the bgp code base to use it. This is prep work for the struct bgp_dest rework. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_flowspec_vty.c')
-rw-r--r--bgpd/bgp_flowspec_vty.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/bgpd/bgp_flowspec_vty.c b/bgpd/bgp_flowspec_vty.c
index c453c4e812..c852e18c46 100644
--- a/bgpd/bgp_flowspec_vty.c
+++ b/bgpd/bgp_flowspec_vty.c
@@ -409,8 +409,8 @@ int bgp_show_table_flowspec(struct vty *vty, struct bgp *bgp, afi_t afi,
}
for (; pi; pi = pi->next) {
total_count++;
- route_vty_out_flowspec(vty, &rn->p, pi, display,
- json_paths);
+ route_vty_out_flowspec(vty, bgp_node_get_prefix(rn), pi,
+ display, json_paths);
}
if (use_json) {
vty_out(vty, "%s\n",
@@ -554,18 +554,18 @@ extern int bgp_flowspec_display_match_per_ip(afi_t afi, struct bgp_table *rib,
json_object *json_paths)
{
struct bgp_node *rn;
- struct prefix *prefix;
+ const struct prefix *prefix;
int display = 0;
for (rn = bgp_table_top(rib); rn; rn = bgp_route_next(rn)) {
- prefix = &rn->p;
+ prefix = bgp_node_get_prefix(rn);
if (prefix->family != AF_FLOWSPEC)
continue;
if (bgp_flowspec_contains_prefix(prefix, match, prefix_check)) {
route_vty_out_flowspec(
- vty, &rn->p, bgp_node_get_bgp_path_info(rn),
+ vty, prefix, bgp_node_get_bgp_path_info(rn),
use_json ? NLRI_STRING_FORMAT_JSON
: NLRI_STRING_FORMAT_LARGE,
json_paths);