diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2012-05-14 10:17:22 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2012-05-14 10:17:22 +0000 |
commit | 4615dcfec6b2273a8785e637cea5ca81258990c5 (patch) | |
tree | eaaa7af133bd6e22d82c5154f7671b5c0b7aac11 /usr.sbin/ldpd/interface.c | |
parent | 75804769a3b77feb9fb2ac9d789d958f6d1b7a4a (diff) |
Don't display a nonsense uptime for an inactive interface. ldpd fix from
Rafael Zalamena on tech@, I also applied it to ospfd. ok phessler@
Diffstat (limited to 'usr.sbin/ldpd/interface.c')
-rw-r--r-- | usr.sbin/ldpd/interface.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ldpd/interface.c b/usr.sbin/ldpd/interface.c index 8628e65614f..d1e2818ad41 100644 --- a/usr.sbin/ldpd/interface.c +++ b/usr.sbin/ldpd/interface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: interface.c,v 1.8 2011/07/04 04:34:14 claudio Exp $ */ +/* $OpenBSD: interface.c,v 1.9 2012/05/14 10:17:21 sthen Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -298,7 +298,8 @@ if_to_ctl(struct iface *iface) } else ictl.hello_timer = -1; - if (iface->state != IF_STA_DOWN) { + if (iface->state != IF_STA_DOWN && + iface->uptime != 0) { ictl.uptime = now.tv_sec - iface->uptime; } else ictl.uptime = 0; |