From: claudio Date: Tue, 18 Oct 2022 12:24:51 +0000 (+0000) Subject: Initalize last_updown in init_peer() so that it is reported correctly X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=324a830cf84a4638e904c3d0bc6ab234c87cd541;p=openbsd Initalize last_updown in init_peer() so that it is reported correctly for peers that never managed to establish a connection. OK tb@ --- diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index b548455de3c..4d92d95545c 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.435 2022/08/31 15:51:44 claudio Exp $ */ +/* $OpenBSD: session.c,v 1.436 2022/10/18 12:24:51 claudio Exp $ */ /* * Copyright (c) 2003, 2004, 2005 Henning Brauer @@ -582,6 +582,8 @@ init_peer(struct peer *p) else timer_set(&p->timers, Timer_IdleHold, 0); /* start ASAP */ + p->stats.last_updown = getmonotime(); + /* * on startup, demote if requested. * do not handle new peers. they must reach ESTABLISHED beforehands.