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 <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2018-08-02 15:40:59 +02:00
parent a09150a061
commit f4110c8571

View File

@ -715,7 +715,9 @@ int repeatinterval[] = { 30, 60 }; /* # of secs before flush */
(f)->f_repeatcount = MAXREPEAT; \ (f)->f_repeatcount = MAXREPEAT; \
} }
#ifdef SYSLOG_INET #ifdef SYSLOG_INET
#ifndef INET_SUSPEND_TIME
#define INET_SUSPEND_TIME 180 /* equal to 3 minutes */ #define INET_SUSPEND_TIME 180 /* equal to 3 minutes */
#endif
#define INET_RETRY_MAX 10 /* maximum of retries for getaddrinfo() */ #define INET_RETRY_MAX 10 /* maximum of retries for getaddrinfo() */
#endif #endif