summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/mrt.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bgpd/mrt.c')
-rw-r--r--usr.sbin/bgpd/mrt.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/bgpd/mrt.c b/usr.sbin/bgpd/mrt.c
index c309c28a4b8..1d29a20602f 100644
--- a/usr.sbin/bgpd/mrt.c
+++ b/usr.sbin/bgpd/mrt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mrt.c,v 1.89 2019/01/21 02:07:56 claudio Exp $ */
+/* $OpenBSD: mrt.c,v 1.90 2019/02/14 10:34:54 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -914,7 +914,7 @@ mrt_timeout(struct mrt_head *mrt)
{
struct mrt *m;
time_t now;
- int timeout = MRT_MAX_TIMEOUT;
+ int timeout = -1;
now = time(NULL);
LIST_FOREACH(m, mrt, entry) {
@@ -925,11 +925,12 @@ mrt_timeout(struct mrt_head *mrt)
MRT2MC(m)->ReopenTimer =
now + MRT2MC(m)->ReopenTimerInterval;
}
- if (MRT2MC(m)->ReopenTimer - now < timeout)
+ if (timeout == -1 ||
+ MRT2MC(m)->ReopenTimer - now < timeout)
timeout = MRT2MC(m)->ReopenTimer - now;
}
}
- return (timeout > 0 ? timeout : 0);
+ return (timeout);
}
void