Skip to content

Commit

Permalink
ospf6d: display passive interfaces and the LSA refresh interval in JS…
Browse files Browse the repository at this point in the history
…ON (#63)

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
  • Loading branch information
rwestphal committed Oct 29, 2021
1 parent 0b1ae77 commit 4eccd01
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
13 changes: 12 additions & 1 deletion ospf6d/ospf6_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,9 @@ static int ospf6_interface_show(struct vty *vty, struct interface *ifp,
if (if_is_operative(ifp) && oi->type != default_iftype)
json_object_string_add(json_obj, "operatingAsType",
ospf6_iftype_str(oi->type));

json_object_boolean_add(
json_obj, "passive",
!!CHECK_FLAG(oi->flag, OSPF6_INTERFACE_PASSIVE));
} else {
vty_out(vty, "%s is %s, type %s\n", ifp->name,
(if_is_operative(ifp) ? "up" : "down"),
Expand All @@ -1106,6 +1108,8 @@ static int ospf6_interface_show(struct vty *vty, struct interface *ifp,
if (if_is_operative(ifp) && oi->type != default_iftype)
vty_out(vty, " Operating as type %s\n",
ospf6_iftype_str(oi->type));
if (CHECK_FLAG(oi->flag, OSPF6_INTERFACE_PASSIVE))
vty_out(vty, " Passive interface\n");
}

if (use_json) {
Expand Down Expand Up @@ -1280,6 +1284,9 @@ static int ospf6_interface_show(struct vty *vty, struct interface *ifp,
json_arr, json_object_new_string(lsa->name));
json_object_object_add(json_obj, "pendingLsaLsAck", json_arr);

if (oi->gr.hello_delay.interval != 0)
json_object_int_add(json_obj, "grHelloDelaySecs",
oi->gr.hello_delay.interval);
} else {
timerclear(&res);
if (oi->thread_send_lsupdate)
Expand All @@ -1303,6 +1310,10 @@ static int ospf6_interface_show(struct vty *vty, struct interface *ifp,
(oi->thread_send_lsack ? "on" : "off"));
for (ALL_LSDB(oi->lsack_list, lsa, lsanext))
vty_out(vty, " %s\n", lsa->name);

if (oi->gr.hello_delay.interval != 0)
vty_out(vty, " Graceful Restart hello delay: %us\n",
oi->gr.hello_delay.interval);
}

/* BFD specific. */
Expand Down
4 changes: 4 additions & 0 deletions ospf6d/ospf6_top.c
Original file line number Diff line number Diff line change
Expand Up @@ -1456,6 +1456,8 @@ static void ospf6_show(struct vty *vty, struct ospf6 *o, json_object *json,

/* Redistribute configuration */
/* XXX */
json_object_int_add(json, "lsaRefreshIntervalSecs",
OSPF_LS_REFRESH_TIME);
json_object_int_add(json, "lsaMinimumArrivalMsecs",
o->lsa_minarrival);

Expand Down Expand Up @@ -1548,6 +1550,8 @@ static void ospf6_show(struct vty *vty, struct ospf6 *o, json_object *json,

/* Redistribute configuration */
/* XXX */
vty_out(vty, " LSA refresh interval %u secs\n",
OSPF_LS_REFRESH_TIME);
vty_out(vty, " LSA minimum arrival %d msecs\n",
o->lsa_minarrival);

Expand Down

0 comments on commit 4eccd01

Please sign in to comment.