From f0c7dfca42ee1238bc76c30c606dbde18ba964e9 Mon Sep 17 00:00:00 2001 From: Ian Lepore Date: Wed, 13 Nov 2013 01:04:02 +0000 Subject: [PATCH] Add ENETUNREACH and EADDRNOTAVAIL to the list of errors that are potentially transient and shouldn't result in closing the socket and giving up forever. --- usr.sbin/syslogd/syslogd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index ce0babf79401..60c74d1d3d59 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1242,8 +1242,10 @@ fprintlog(struct filed *f, int flags, const char *msg) switch (errno) { case ENOBUFS: case ENETDOWN: + case ENETUNREACH: case EHOSTUNREACH: case EHOSTDOWN: + case EADDRNOTAVAIL: break; /* case EBADF: */ /* case EACCES: */ @@ -1254,7 +1256,7 @@ fprintlog(struct filed *f, int flags, const char *msg) /* case ENOBUFS: */ /* case ECONNREFUSED: */ default: - dprintf("removing entry\n"); + dprintf("removing entry: errno=%d\n", e); f->f_type = F_UNUSED; break; }