[bazsi@balabit.hu: Re: [syslog-ng] Re: bug?]
This mail contains two patches you may be interested in. (especially under *BSD) ----- Forwarded message from Balazs Scheidler <bazsi@balabit.hu> ----- Date: Mon, 19 Jul 1999 23:42:49 +0200 From: Balazs Scheidler <bazsi@balabit.hu> To: joeym@inficad.com Subject: Re: [syslog-ng] Re: bug?
Sometimes when I SIGHUP syslog-ng (client or server), I will get this too:
SIGHUP received, restarting syslog-ng new configuration initialized io_iter(): no waiting fds and no callouts! exiting...
However, every once in a while, it will say 'new configuration initilized' and keep right on going. But most of the time, it gives the io_iter() err and exits.
Please try this patch against libol: --- libol-0.2.0/src/io.c Sat Jul 10 15:23:09 1999 +++ libol/src/io.c Mon Jul 19 23:04:46 1999 @@ -268,9 +268,7 @@ ol_queue_remove(&n->header); ol_space_free(n); } - else { - nco++; - } + nco++; } } if (!nfds && !nco) { The other problem should be BSD specific. (or my solution is Linux specific some way. I assumed that recvfrom() on connected sockets return the source address of the connection, but as it seems under BSD this is not the case.) Try the following somewhat (ugly) patch, to see if this is the problem: --- syslog-ng-1.1.27/src/afsocket.c Sat Jul 10 17:58:33 1999 +++ syslog-ng/src/afsocket.c Mon Jul 19 23:22:37 1999 @@ -106,6 +106,16 @@ static void do_handle_afinet_line(struct log_handler *c, struct log_info *msg) { CAST(afsocket_source_connection, self, c); + if (!msg->saddr) { + char sockaddr_buf[256]; + struct sockaddr *sa = (struct sockaddr *) &sockaddr_buf; + int salen = sizeof(sockaddr_buf); + + if (getpeername(self->fd, sa, &salen) != -1) { + msg->saddr = ol_space_alloc(salen); + memcpy(msg->saddr, sa, salen); + } + } HANDLE_LOG(self->super.next, msg); } I've fixed another problem not reported by you. Variable names beginning with the same bytestring (e.g. f_router & f_router_acct) were resolved incorrectly. Check out the mailing list (or the archive at http://lists.balabit.hu/pipermail) for that patch. -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1 url: http://www.balabit.hu/pgpkey.txt ----- End forwarded message ----- -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1 url: http://www.balabit.hu/pgpkey.txt
participants (1)
-
Balazs Scheidler