diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c index 25acf25b095a..8df3e2291078 100644 --- a/ospf6d/ospf6_neighbor.c +++ b/ospf6d/ospf6_neighbor.c @@ -890,7 +890,7 @@ static void ospf6_neighbor_show(struct vty *vty, struct ospf6_neighbor *on, struct timeval res; char nstate[17]; char deadtime[64]; - long h, m, s; + long h, m, s, time_store; json_object *json_route; /* Router-ID (Name) */ @@ -940,10 +940,30 @@ static void ospf6_neighbor_show(struct vty *vty, struct ospf6_neighbor *on, json_route = json_object_new_object(); json_object_string_add(json_route, "neighborId", router_id); +#if CONFDATE > 20241129 + CPP_NOTICE( + "Remove %s() JSON keys: state, priority", __func__) +#endif json_object_int_add(json_route, "priority", on->priority); json_object_string_add(json_route, "deadTime", deadtime); json_object_string_add(json_route, "state", ospf6_neighbor_state_str[on->state]); + json_object_int_add(json_route, "nbrPriority", on->priority); + json_object_string_add(json_route, "nbrState", nstate); + json_object_string_add(json_route, "Role", + ospf6_neighbor_state_str[on->state]); + if (on->inactivity_timer) { + time_store = + monotime_until(&on->inactivity_timer->u.sands, + NULL) + / 1000LL; + json_object_int_add(json_route, + "routerDeadIntervalTimerDueMsec", + time_store); + } else + json_object_string_add(json_route, + "routerDeadIntervalTimerDueMsec", + "inactive"); json_object_string_add(json_route, "ifState", nstate); json_object_string_add(json_route, "duration", duration); json_object_string_add(json_route, "interfaceName",