From 1dfb70a21d01c7a2d752dc8fe780adc153facd1f Mon Sep 17 00:00:00 2001 From: claudio Date: Tue, 27 Dec 2022 12:11:39 +0000 Subject: [PATCH] Only print the hello_timer if it is actually running. Problem reported by Wouter Prins. Initial diff by kn@ OK remi@ --- usr.sbin/ospf6ctl/ospf6ctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/ospf6ctl/ospf6ctl.c b/usr.sbin/ospf6ctl/ospf6ctl.c index 21414b28fd2..af034dcb925 100644 --- a/usr.sbin/ospf6ctl/ospf6ctl.c +++ b/usr.sbin/ospf6ctl/ospf6ctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ospf6ctl.c,v 1.52 2022/01/20 14:12:55 naddy Exp $ */ +/* $OpenBSD: ospf6ctl.c,v 1.53 2022/12/27 12:11:39 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker @@ -388,6 +388,7 @@ show_interface_msg(struct imsg *imsg) err(1, NULL); printf("%-11s %-29s %-6s %-10s %-10s %s\n", iface->name, netid, if_state_name(iface->state), + iface->hello_timer < 0 ? "-" : fmt_timeframe_core(iface->hello_timer), get_linkstate(iface->if_type, iface->linkstate), fmt_timeframe_core(iface->uptime)); -- 2.20.1