[syslog-ng] IPv6 Link local address use with syslog-ng
Philip Bellino
pbellino at mrv.com
Mon Nov 19 18:57:23 CET 2007
Simon,
I tried "tcp6(ip(fe80::220:abff:febe:4dac%eth0) port(1468));" in my earlier testing and received the syslog error:
"Error binding socket" addr='AF_INET6(fe80::220:abff:febe:4dac)', error='Invalid argument (22)'
Phil Bellino
-----Original Message-----
From: syslog-ng-bounces at lists.balabit.hu [mailto:syslog-ng-bounces at lists.balabit.hu] On Behalf Of Simon Arlott
Sent: Monday, November 19, 2007 12:41 PM
To: Syslog-ng users' and developers' mailing list
Subject: Re: [syslog-ng] IPv6 Link local address use with syslog-ng
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
More information about the syslog-ng
mailing list