The branch main has been updated by kp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=47785e6a39cdcbf4eb7d02c381a53916774ed991

commit 47785e6a39cdcbf4eb7d02c381a53916774ed991
Author:     Kristof Provost <k...@freebsd.org>
AuthorDate: 2025-08-18 09:52:04 +0000
Commit:     Kristof Provost <k...@freebsd.org>
CommitDate: 2025-08-18 15:10:01 +0000

    syslogd: EAGAIN and ECONNREFUSED are not permanently fatal
    
    When we're forwarding syslog messages to a remote host we can get temporary
    failures such as EAGAIN or ECONNREFUSED from the sendmsg() call. These are 
not
    fatal. Future attempts to send might succeed. Don't mark the remote target 
as
    F_UNUSED so we'll try to log again on future messages.
    
    While here remove the commented out ENOBUFS case, because we actually handle
    that (by ignoring it, so we retry with future logs).
    
    Reviewed by:    markj, jfree
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    Differential Revision:  https://reviews.freebsd.org/D51995
---
 usr.sbin/syslogd/syslogd.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index fe7427130b78..81bbbbe66be8 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -1830,15 +1830,14 @@ fprintlog_write(struct filed *f, struct iovlist *il, 
int flags)
                        case EHOSTUNREACH:
                        case EHOSTDOWN:
                        case EADDRNOTAVAIL:
+                       case EAGAIN:
+                       case ECONNREFUSED:
                                break;
                        /* case EBADF: */
                        /* case EACCES: */
                        /* case ENOTSOCK: */
                        /* case EFAULT: */
                        /* case EMSGSIZE: */
-                       /* case EAGAIN: */
-                       /* case ENOBUFS: */
-                       /* case ECONNREFUSED: */
                        default:
                                dprintf("removing entry: errno=%d\n", e);
                                f->f_type = F_UNUSED;

Reply via email to