summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd/neighbor.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2005-09-29 15:14:58 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2005-09-29 15:14:58 +0000
commit683d36c7f7fa09c81a804da2caee62de599602d1 (patch)
treef7aef40f2a10ae2dd71c9079c5347f9747710921 /usr.sbin/ospfd/neighbor.c
parentfd5533217a5af953e8fd70571cb167b40cdfbad9 (diff)
Show the time a neighbor was DOWN instead of counting down from
DEFAULT_NBR_TMOUT. Makes it easy to see since when a peer is dead. OK norby@ some time ago
Diffstat (limited to 'usr.sbin/ospfd/neighbor.c')
-rw-r--r--usr.sbin/ospfd/neighbor.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/ospfd/neighbor.c b/usr.sbin/ospfd/neighbor.c
index b2660e61bcd..5e561d7fdd6 100644
--- a/usr.sbin/ospfd/neighbor.c
+++ b/usr.sbin/ospfd/neighbor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: neighbor.c,v 1.23 2005/06/13 08:32:29 claudio Exp $ */
+/* $OpenBSD: neighbor.c,v 1.24 2005/09/29 15:14:57 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -677,7 +677,10 @@ nbr_to_ctl(struct nbr *nbr)
gettimeofday(&now, NULL);
if (evtimer_pending(&nbr->inactivity_timer, &tv)) {
timersub(&tv, &now, &res);
- nctl.dead_timer = res.tv_sec;
+ if (nbr->state & NBR_STA_DOWN)
+ nctl.dead_timer = DEFAULT_NBR_TMOUT - res.tv_sec;
+ else
+ nctl.dead_timer = res.tv_sec;
} else
nctl.dead_timer = 0;