Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 425116 - app-admin/syslog-ng: IPv6 does not work even with ipv6 useflag set
Summary: app-admin/syslog-ng: IPv6 does not work even with ipv6 useflag set
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-06 22:32 UTC by Aaron Jones
Modified: 2012-07-07 01:41 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Jones 2012-07-06 22:32:52 UTC
Syslog-ng lets you configure network logging (so that you can send your logs somewhere else instead of writing them to the disk). You must configure a hostname or IP address inside a tcp() or udp() statement to use this.

For example:

----

source s_src {
  unix-stream("/dev/log");
  file("/proc/kmsg");
};

destination d_otherbox {
  tcp("hostname.com" port(514));
};

log {
  source(s_src);
  destination(d_otherbox);
};

----

The only problem is that even with the 'ipv6' useflag set, it does not use IPv6 when a hostname resolves to both or only IPv6, and refuses IPv6 addresses instead of hostnames (it tries to resolve them, which obviously fails).

Reproducible: Always

Steps to Reproduce:
1. Configure syslog-ng to write logs to an IPv6 host (hostname or address).
2. Start it.
Actual Results:  
Observe that if you give a hostname that resolves to both kinds of addresses, "lsof -nPi | grep syslog" lists it connecting using IPv4.

Observe that if you give it an IPv6 address, it complains on startup that it cannot resolve it, and lsof shows nothing.

Either way it does not work over IPv6.

Expected Results:  
When the IPv6 use flag is set, it should work just like using IPv4 works.
Comment 1 Aaron Jones 2012-07-06 22:35:48 UTC
[I] app-admin/syslog-ng
     Available versions:  3.2.5!t ~3.3.5!t ~3.3.5-r1!t {caps hardened ipv6 json mongodb +pcre selinux spoof-source sql ssl static tcpd}
     Installed versions:  3.2.5!t(10:52:29 PM 07/06/2012)(hardened ipv6 -caps -pcre -selinux -spoof-source -sql -ssl -tcpd)
     Homepage:            http://www.balabit.com/products/syslog_ng/
     Description:         syslog replacement with advanced filtering features
Comment 2 Aaron Jones 2012-07-06 22:46:49 UTC
Follow-up: On the other side (the machine receiving the messages), you also use a udp() or tcp() statement, but inside a source {} block, and without arguments.

For example:

----

source s_otherboxes {
    tcp();
};

----

But when you start it, it uses only an IPv4 socket:

abraxas ~ # lsof -nPi | grep syslog
syslog-ng 16621     root    7u  IPv4 6247842      0t0  TCP *:514 (LISTEN)

It should use an IPv6 socket (when /proc/sys/net/ipv6/bindv6only is set to 0), or one socket for each protocol.
Comment 3 Aaron Jones 2012-07-07 01:41:55 UTC
Hum. It seems that even with IPv6 enabled, you still have to go out of your way to make it use it. You need udp6() and tcp6() instead of udp() and tcp().

Nevermind. RESOLVED INVALID.