[syslog-ng] IPv6 Link local address use with syslog-ng

Simon Arlott simon at arlott.org
Mon Nov 19 18:41:01 CET 2007


On 19/11/07 09:39, Balazs Scheidler wrote:
> On Fri, 2007-11-16 at 10:38 -0500, Philip Bellino wrote:
>> Hello,
>> 
>> Running syslog-ng-2.0.5 on a Linux host 2.6.22.9.
>> 
>> syslog-ng.conf entry as follows:
>> 
>> source s_all {
>> 
>>         tcp6(ip(2001:470:1f00:1288:220:abff:febe:4dac) port(1468));
>> 
>> };
>> 
>> When syslog-ng is started, the Global address
>> (2001:470:1f00:1288:220:abff:febe:4dac) binds and connects fine.
>> 
>> If I have the Link Local Address configured below:
>> 
>> source s_all {
>> 
>>         tcp6(ip(fe80::220:abff:febe:4dac) port(1468));
>> 
>> };
>> 
>> And start syslog-ng, it either errors on the bind or the
>> connect(g_connect in gsockaddr.c) with an errno of 22 (Invalid
>> Argument).
>> 
>> Looking at the code shows that there is no use of the sockaddr_in6
>> “sin6_scope_id”, which is required to be set when using Link Local
>> addresses since they need to use the interface number (sin6_scope_id).
>> 
>> Has anyone run into this issue?
>> 
>> If so, is there a workaround or a code patch for this?
> 
> I don't know about any. In fact I'm not using the ipv6 parts myself, so
> there might be some quirks here and there.
> 
> To be honest, I've absolutely no clue how scope id is usually set. Can
> you recommend something?
> 

For:
tcp6(ip(fe80::220:abff:febe:4dac%eth0) port(1468));

(address with %eth0 appended)


You'd set the scope id on the address you use to bind (if any), and again 
on the destination:
...->sin6_scope_id = if_nametoindex("eth0");

-- 
Simon Arlott

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3619 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.balabit.hu/pipermail/syslog-ng/attachments/20071119/54801353/attachment.bin 


More information about the syslog-ng mailing list