From f4110c857146833cc2e69b5af6b7738f9e8fbb23 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Thu, 2 Aug 2018 15:40:59 +0200 Subject: [PATCH] Enable configuration of INET_SUSPEND_TIME from build system When sysklogd is built with SYSLOG_INET the user can now optionally also define the INET_SUSPEND_TIME. The default is 180 sec, which may be a bit too long for some systems. In practice when a system comes up syslogd+klogd starts before all other processes, even those that bring up the network, so waiting 3 minutes before trying again to send to a remote syslog server would mean losing a lot of info from the bootstrapping of a system. Signed-off-by: Joachim Nilsson --- syslogd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/syslogd.c b/syslogd.c index 8553f15..322cad7 100644 --- a/syslogd.c +++ b/syslogd.c @@ -715,7 +715,9 @@ int repeatinterval[] = { 30, 60 }; /* # of secs before flush */ (f)->f_repeatcount = MAXREPEAT; \ } #ifdef SYSLOG_INET +#ifndef INET_SUSPEND_TIME #define INET_SUSPEND_TIME 180 /* equal to 3 minutes */ +#endif #define INET_RETRY_MAX 10 /* maximum of retries for getaddrinfo() */ #endif