summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_interface.c
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <jafar@atcorp.com>2022-11-08 23:25:39 -0600
committerGitHub <noreply@github.com>2022-11-08 23:25:39 -0600
commit25bc53234d8e8c341108c16689a68b5b3bf735ce (patch)
tree55db964822354b7077e32a16a5c22d010599aa61 /ospf6d/ospf6_interface.c
parent7c45db33c3656f25443940938784683be004f6c6 (diff)
parent93bae5f81f5598b88b684d601b023ed0d2fad2fa (diff)
Merge pull request #12280 from opensourcerouting/fix/ospv6_show_passive_interface
ospf6d: Show if the interface is passive for `show ipv6 ospf6 interface`
Diffstat (limited to 'ospf6d/ospf6_interface.c')
-rw-r--r--ospf6d/ospf6_interface.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index 8d79963c78..ed228f46ae 100644
--- a/ospf6d/ospf6_interface.c
+++ b/ospf6d/ospf6_interface.c
@@ -1117,14 +1117,21 @@ static int ospf6_interface_show(struct vty *vty, struct interface *ifp,
oi->dead_interval);
json_object_int_add(json_obj, "timerIntervalsConfigRetransmit",
oi->rxmt_interval);
+ json_object_boolean_add(
+ json_obj, "timerPassiveIface",
+ !!CHECK_FLAG(oi->flag, OSPF6_INTERFACE_PASSIVE));
} else {
vty_out(vty, " State %s, Transmit Delay %d sec, Priority %d\n",
ospf6_interface_state_str[oi->state], oi->transdelay,
oi->priority);
vty_out(vty, " Timer intervals configured:\n");
- vty_out(vty, " Hello %d(%pTHd), Dead %d, Retransmit %d\n",
- oi->hello_interval, oi->thread_send_hello,
- oi->dead_interval, oi->rxmt_interval);
+ if (!CHECK_FLAG(oi->flag, OSPF6_INTERFACE_PASSIVE))
+ vty_out(vty,
+ " Hello %d(%pTHd), Dead %d, Retransmit %d\n",
+ oi->hello_interval, oi->thread_send_hello,
+ oi->dead_interval, oi->rxmt_interval);
+ else
+ vty_out(vty, " No Hellos (Passive interface)\n");
}
inet_ntop(AF_INET, &oi->drouter, drouter, sizeof(drouter));