oh, there it is - thanks, will see that I integrate it ASAP, what most
probably means tomorrow morning :)

> -----Original Message-----
> From: [email protected] [mailto:rsyslog-
> [email protected]] On Behalf Of Tomas Kubina
> Sent: Wednesday, December 09, 2009 1:48 PM
> To: rsyslog-users
> Subject: Re: [rsyslog] TLS/GSSAPI client message lost
> 
> Tomas Kubina wrote:
> > Rainer Gerhards wrote:
> >> I unfortunately do not have enough insight into GSSAPI to provide a
> real
> >> answer. My guess is that this happens for the same reason it can
> >> happen with
> >> any ack-less transport. In the plain tcp driver, I have done quite
> >> some work
> >> to try to limit loss potential. I have also some ideas of how to
> >> further try
> >> to prevent message loss, but you cannot totally aovid it.
> >>
> >> some background:
> >>
> >> http://blog.gerhards.net/2008/04/on-unreliability-of-plain-tcp-
> syslog.html
> >>
> >>
> >> Rainer
> >>
> >>
> >>> -----Original Message-----
> >>> From: [email protected] [mailto:rsyslog-
> >>> [email protected]] On Behalf Of Tomas Kubina
> >>> Sent: Monday, November 30, 2009 2:56 PM
> >>> To: [email protected]
> >>> Subject: [rsyslog] TLS/GSSAPI client message lost
> >>>
> >>> Hi,
> >>>
> >>> I want to use TLS or GSS for message delivering to central rsyslog
> >>> server.
> >>> The problem is that the first message logged after server's
> shutdown is
> >>> lost,
> >>> but when I use plain TCP this issue doesn't happen. Is it a feature
> or
> >>> mistake
> >>> in my config?
> >>>
> >>> Tomas
> >>
> > I have done a patch to GSSAPI based on your code from nsd_ptcp.c.
> > It works and can be added into svn if you want.
> >
> > Regards,
> >
> > Tomas Kubina
> Sorry, I'm not sure if I the previous mail contained right attachment,
> so here is the patch:
> 
> --- rsyslog-5.5.1/gss-misc.c    2009-11-27 10:40:51.000000000 +0100
> +++ rsyslog-5.5.1-tom/gss-misc.c    2009-12-09 13:26:47.000000000 +0100
> @@ -152,8 +152,15 @@
>  {
>      int     ret;
>      char   *ptr;
> +    char    msgbuf[1]; /* dummy */
> 
>      for (ptr = buf; nbyte; ptr += ret, nbyte -= ret) {
> +    ret = recv(fd, msgbuf, 1, MSG_DONTWAIT | MSG_PEEK);
> +    if(ret == 0) {
> +        dbgprintf("write_all function detected broken connection\n");
> +        /* in this case, the remote peer had shut down the connection
> */
> +        return -1;
> +    }
>      ret = send(fd, ptr, nbyte, 0);
>      if (ret < 0) {
>          if (errno == EINTR)
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com

Reply via email to