[syslog-ng] TTL patch, helpful for multicasting logs

Alexander Clouter ac56 at soas.ac.uk
Wed May 3 13:23:53 CEST 2006


Hi,

Balazs Scheidler <bazsi at balabit.hu> [20060501 00:43:58 +0200]:
>
> On Thu, 2006-03-30 at 15:13 +0100, Alexander Clouter wrote:
> > Hi,
> > 
> > After my earlier multicast patch I quickly realised that if syslog-ng is 
> > actually sending UDP multicast syslog data the TTL on the IP packets is by 
> > default 1.  This results in the packet being expired at the gateway and never 
> > being able to leave the subnet....not too handy :(
> 
> I have now implemented generic socket option setup code and support for
> TTL and multicast. The patch below does that. It has no real connection
> to the code that you posted, as I tried to minimize the effect on
> GSockAddr, as it encapsulates a socket address but nothing else.
> 
Probably for the best :)  Cheers for adding the multicast support in the 
Right Way(tm) :)

> [snipped]
> 
> Multicast is enabled if the bind/target address is a multicast address.
> 
Its worth noting that there is no need to setsockopt(MULTICAST_BLAH) when you 
are sending data to a multicast address.  There is no harm in doing so, but 
you might end up receiving the traffic you just sent if you are not careful.

I would recommend *only* when its a bind address that 
setsockopt(MULTICAST_BLAH) is called...

Cheers again

Regards

Alex


More information about the syslog-ng mailing list