Your message dated Sat, 11 May 2013 10:05:52 +0000
with message-id <[email protected]>
and subject line Bug#707655: Removed package(s) from unstable
has caused the Debian Bug report #156232,
regarding Please add multicast support to syslogd
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
156232: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=156232
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: sysklogd
Version: 1.4.1-10
Severity: wishlist

It would be useful if syslogd would support remote logging using IP
multicast. With this, one could have several log hosts that all receive the
same log messages. This is useful to provide redundancy but also for
receiving log messages on machines that are not always up (e.g. on my
notebook where I run xconsole to see all log messages on my net).

Basically, everything that's needed is already there, the receiving syslogd
just hast to join the right multicast group to get the messages. The patch
below implements this. Would be nice if you could add that to the next
release.

Thanks,
Martin


diff -rc sysklogd-1.4.1.orig/Makefile sysklogd-1.4.1/Makefile
*** sysklogd-1.4.1.orig/Makefile        Mon Oct 12 22:25:15 1998
--- sysklogd-1.4.1/Makefile     Sat Aug 10 16:00:20 2002
***************
*** 44,50 ****
  # ballot below.
  SYSLOGD_PIDNAME = -DSYSLOGD_PIDNAME=\"syslogd.pid\"
  
! SYSLOGD_FLAGS= -DSYSLOG_INET -DSYSLOG_UNIXAF -DNO_SCCS ${FSSTND} \
        ${SYSLOGD_PIDNAME}
  SYSLOG_FLAGS= -DALLOW_KERNEL_LOGGING
  KLOGD_FLAGS = ${FSSTND} ${KLOGD_START_DELAY}
--- 44,50 ----
  # ballot below.
  SYSLOGD_PIDNAME = -DSYSLOGD_PIDNAME=\"syslogd.pid\"
  
! SYSLOGD_FLAGS= -DSYSLOG_INET -DSYSLOG_INET_MCAST -DSYSLOG_UNIXAF -DNO_SCCS 
${FSSTND} \
        ${SYSLOGD_PIDNAME}
  SYSLOG_FLAGS= -DALLOW_KERNEL_LOGGING
  KLOGD_FLAGS = ${FSSTND} ${KLOGD_START_DELAY}
diff -rc sysklogd-1.4.1.orig/sysklogd.8 sysklogd-1.4.1/sysklogd.8
*** sysklogd-1.4.1.orig/sysklogd.8      Sun Mar 11 20:35:51 2001
--- sysklogd-1.4.1/sysklogd.8   Sat Aug 10 19:12:55 2002
***************
*** 21,26 ****
--- 21,29 ----
  .RB [ " \-m "
  .I interval
  ] 
+ .RB [ " \-M "
+ .I multicast group
+ ] 
  .RB [ " \-n " ]
  .RB [ " \-p"
  .IB socket 
***************
*** 119,124 ****
--- 122,133 ----
  .I interval
  to zero turns it off entirely.
  .TP
+ .BI "\-M " "multicast group"
+ Join (static) multicast group for reception of remote messages sent using
+ IP multicast. You most likely want to specify the
+ .B "\-r"
+ option as well if you use this.
+ .TP
  .B "\-n"
  Avoid auto-backgrounding.  This is needed especially if the
  .B syslogd
***************
*** 393,399 ****
  messages from them is only opened when it is needed.  In releases
  prior to 1.3-23 it was opened every time but not opened for reading or
  forwarding respectively.
! 
  .SH OUTPUT TO NAMED PIPES (FIFOs)
  This version of syslogd has support for logging output to named pipes
  (fifos).  A fifo or named pipe can be used as a destination for log
--- 402,419 ----
  messages from them is only opened when it is needed.  In releases
  prior to 1.3-23 it was opened every time but not opened for reading or
  forwarding respectively.
! .LP
! .SH MULTICAST SUPPORT
! This version of syslogd has special support for multicast remote logging.
! This allows you to have several log servers that all receive the same log
! messages from the clients.
! 
! For this to work, you have to statically assign a multicast group to be used
! for syslog (e.g. 239.255.0.1). Then you configure the clients for remote
! logging as above but use @239.255.0.1 as the log server hostname. Finally,
! tell the log servers to join this multicast group and to receive messages
! from it using the options \fB-r -M 239.255.0.1\fR.
! .LP
  .SH OUTPUT TO NAMED PIPES (FIFOs)
  This version of syslogd has support for logging output to named pipes
  (fifos).  A fifo or named pipe can be used as a destination for log
diff -rc sysklogd-1.4.1.orig/syslogd.c sysklogd-1.4.1/syslogd.c
*** sysklogd-1.4.1.orig/syslogd.c       Sun Mar 11 20:40:10 2001
--- sysklogd-1.4.1/syslogd.c    Sat Aug 10 17:34:07 2002
***************
*** 735,740 ****
--- 735,741 ----
  char  **LocalHosts = NULL;    /* these hosts are logged with their hostname */
  int   NoHops = 1;             /* Can we bounce syslog messages through an
                                   intermediate host. */
+ char  *McastGroup;            /* multicast group to join for reception of 
messages */
  
  extern        int errno;
  
***************
*** 829,835 ****
                funix[i]  = -1;
        }
  
!       while ((ch = getopt(argc, argv, "a:dhf:l:m:np:rs:v")) != EOF)
                switch((char)ch) {
                case 'a':
                        if (nfunix < MAXFUNIX)
--- 830,836 ----
                funix[i]  = -1;
        }
  
!       while ((ch = getopt(argc, argv, "a:dhf:l:m:M:np:rs:v")) != EOF)
                switch((char)ch) {
                case 'a':
                        if (nfunix < MAXFUNIX)
***************
*** 857,862 ****
--- 858,866 ----
                case 'm':               /* mark interval */
                        MarkInterval = atoi(optarg) * 60;
                        break;
+               case 'M':               /* multicast group to join */
+                       McastGroup = optarg;
+                       break;
                case 'n':               /* don't fork */
                        NoFork = 1;
                        break;
***************
*** 1174,1181 ****
  
  int usage()
  {
!       fprintf(stderr, "usage: syslogd [-drvh] [-l hostlist] [-m markinterval] 
[-n] [-p path]\n" \
!               " [-s domainlist] [-f conffile]\n");
        exit(1);
  }
  
--- 1178,1185 ----
  
  int usage()
  {
!       fprintf(stderr, "usage: syslogd [-drvh] [-l hostlist] [-m markinterval] 
[-M mcastgroup]\n"
!                       " [-n] [-p path] [-s domainlist] [-f conffile]\n");
        exit(1);
  }
  
***************
*** 1216,1221 ****
--- 1220,1229 ----
  {
        int fd, on = 1;
        struct sockaddr_in sin;
+ #ifdef SYSLOG_INET_MCAST
+       struct hostent *hent;
+       struct ip_mreq mreq;
+ #endif
  
        fd = socket(AF_INET, SOCK_DGRAM, 0);
        if (fd < 0) {
***************
*** 1241,1246 ****
--- 1249,1287 ----
                close(fd);
                return -1;
        }
+ #ifdef SYSLOG_INET_MCAST
+       /* If we're supporting multicast logging, tell the kernel not to loop
+        * back our own traffic to prevent syslog loops. Yes, this is really
+        * required and the check in fprintlog() alone will not prevent it
+        * since that only drops messages from remote hosts.
+        * We do this even if we don't join a multicast group since somebody
+        * might be stupid enough to specify the all-hosts multicast group
+        * 224.0.0.1 to send to and we're a member of that by default.
+        * Needless to say that I learned this the hard way. ;-)
+        */
+       on = 0;
+       if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, \
+                       (char *) &on, sizeof(on)) < 0) {
+               logerror("setsockopt(IP_MULTICAST_LOOP), suspending inet");
+               close(fd);
+               return -1;
+       }
+       /* Join multicast group if we were asked to */
+       if (McastGroup) {
+               hent = gethostbyname(McastGroup);
+               if (!hent) {
+                       logerror("can't resolve multicast group name, 
suspending mcast");
+               } else {
+                       memcpy(&mreq.imr_multiaddr.s_addr, hent->h_addr,
+                              sizeof(mreq.imr_multiaddr.s_addr));
+                       mreq.imr_interface.s_addr = htonl(INADDR_ANY);
+                       if (setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP,
+                                      &mreq, sizeof(mreq)) < 0) {
+                               logerror("failed to join multicast group, 
suspending mcast");
+                       }
+               }
+       }
+ #endif
        if (bind(fd, (struct sockaddr *) &sin, sizeof(sin)) < 0) {
                logerror("bind, suspending inet");
                close(fd);


--- End Message ---
--- Begin Message ---
Version: 1.5-6.2+rm

Dear submitter,

as the package sysklogd has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see http://bugs.debian.org/707655

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
[email protected].

Debian distribution maintenance software
pp.
Ansgar Burchardt (the ftpmaster behind the curtain)

--- End Message ---

Reply via email to