From 5bfe15f767295482babe6e8eacf213dc2b188c8f Mon Sep 17 00:00:00 2001 From: Johan Askerin Date: Thu, 16 Jan 2020 14:27:00 +0100 Subject: [PATCH] syslogd: Fix startup issue with remote sinks Only reset f_fime when the filed is in normal operation, not suspended, otherwise the INET_SUSPEND_TIME handling is broken. Signed-off-by: Johan Askerin Signed-off-by: Joachim Nilsson --- src/syslogd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/syslogd.c b/src/syslogd.c index 72c64fc..a217b2d 100644 --- a/src/syslogd.c +++ b/src/syslogd.c @@ -1622,8 +1622,10 @@ static void fprintlog_first(struct filed *f, struct buf_msg *buffer) /* Messages generated by syslogd itself may not have a timestamp */ check_timestamp(buffer); - f->f_time = timer_now(); - f->f_prevcount = 0; + if (f->f_type != F_FORW_SUSP) { + f->f_time = timer_now(); + f->f_prevcount = 0; + } if (f->f_flags & RFC5424) iovcnt = fmt5424(buffer, RFC5424_DATEFMT, iov, NELEMS(iov));