Skip to content

Commit

Permalink
bgpd: add rpki json attributes to bgp path
Browse files Browse the repository at this point in the history
Add missing json attribute to BGP path.

Fixes: 82c298b ("bgpd: Show RPKI short state in `show bgp <afi> <safi>`")
Signed-off-by: Philippe Guibert <[email protected]>
  • Loading branch information
pguibert6WIND committed Dec 18, 2024
1 parent 6c3e1e4 commit 255866e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -9364,6 +9364,15 @@ static void route_vty_short_status_out(struct vty *vty,
enum rpki_states rpki_state = RPKI_NOT_BEING_USED;

if (json_path) {
/* RPKI validation state */
rpki_state = hook_call(bgp_rpki_prefix_status, path->peer, path->attr, p);

if (rpki_state == RPKI_VALID)
json_object_boolean_true_add(json_path, "rpkiValid");
else if (rpki_state == RPKI_INVALID)
json_object_boolean_true_add(json_path, "rpkiInvalid");
else if (rpki_state == RPKI_NOTFOUND)
json_object_boolean_true_add(json_path, "rpkiNotFound");

/* Route status display. */
if (CHECK_FLAG(path->flags, BGP_PATH_REMOVED))
Expand Down

0 comments on commit 255866e

Please sign in to comment.