From b7b3c10a7a9db7389b86263b0613e7b2b20a309f Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Mon, 2 Nov 2020 00:30:57 +0000 Subject: print "depend on" information when available in "ospfctl sh int" output. ok remi@ --- usr.sbin/ospfctl/output.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'usr.sbin/ospfctl') diff --git a/usr.sbin/ospfctl/output.c b/usr.sbin/ospfctl/output.c index 12d3f8249a9..29d01cc545b 100644 --- a/usr.sbin/ospfctl/output.c +++ b/usr.sbin/ospfctl/output.c @@ -170,10 +170,15 @@ show_interface(struct ctl_iface *iface, int detail) printf(" Router ID %s, network type %s, cost: %d\n", inet_ntoa(iface->rtr_id), if_type_name(iface->type), iface->metric); + if (iface->dependon[0] != '\0') { + printf(" Depends on %s, %s\n", iface->dependon, + iface->depend_ok ? "up" : "down"); + } printf(" Transmit delay is %d sec(s), state %s, priority %d\n", iface->transmit_delay, if_state_name(iface->state), iface->priority); - printf(" Designated Router (ID) %s, ", inet_ntoa(iface->dr_id)); + printf(" Designated Router (ID) %s, ", + inet_ntoa(iface->dr_id)); printf("interface address %s\n", inet_ntoa(iface->dr_addr)); printf(" Backup Designated Router (ID) %s, ", inet_ntoa(iface->bdr_id)); -- cgit v1.2.3