Hi!

I have seen it number of times but haven't had time to investigate it
further. I have another ugly workaround to fix it. In my case it
happens because the route to the syslog target is learned via bgp and
the bgp is not up when syslogd tries to send first message. Your patch
fixes it.

Rivo

On Fri, 2017-09-29 at 13:44 +0200, Alexander Bluhm wrote:
> Hi,
> 
> A customer has seen a "Can't assign requested address" error from
> syslogd(8) at boot time and then sending messages per UDP did not
> work.  It is a carp(4) setup.
> 
> So I would suggest to add EADDRNOTAVAIL to the error numbers that
> are ignored when doing UDP sendto(2).  Otherwise syslogd would no
> longer send to this destination after the error occured once.
> 
> ok?
> 
> bluhm
> 
> Index: usr.sbin/syslogd/syslogd.c
> ===================================================================
> RCS file: /data/mirror/openbsd/cvs/src/usr.sbin/syslogd/syslogd.c,v
> retrieving revision 1.249
> diff -u -p -r1.249 syslogd.c
> --- usr.sbin/syslogd/syslogd.c        27 Sep 2017 15:09:48 -0000      
> 1.249
> +++ usr.sbin/syslogd/syslogd.c        29 Sep 2017 11:32:51 -0000
> @@ -1957,6 +1957,7 @@ fprintlog(struct filed *f, int flags, ch
>                   (struct sockaddr *)&f->f_un.f_forw.f_addr,
>                   f->f_un.f_forw.f_addr.ss_len) != l) {
>                       switch (errno) {
> +                     case EADDRNOTAVAIL:
>                       case EHOSTDOWN:
>                       case EHOSTUNREACH:
>                       case ENETDOWN:
> 

Reply via email to