Re: syslogd ipv6 proto6

2014-08-25 Thread Alexander Bluhm
On Fri, Aug 22, 2014 at 06:43:47PM +0200, Alexander Bluhm wrote: > At the moment syslogd opens both IPv4 and IPv6 sockets unconditionally. > I can restrict it to a protocol family with -4 and -6 command line > switches. If the log server is a FQDN, DNS chosses wether to take > the IPv4 or IPv6 rou

Re: syslogd ipv6 proto6

2014-08-25 Thread Alexander Bluhm
On Sat, Aug 23, 2014 at 01:10:52PM +0200, Alexander Bluhm wrote: > On Fri, Aug 22, 2014 at 06:43:47PM +0200, Alexander Bluhm wrote: > > At the moment syslogd opens both IPv4 and IPv6 sockets unconditionally. > > I can restrict it to a protocol family with -4 and -6 command line > > switches. If th

Re: syslogd ipv6 proto6

2014-08-23 Thread Alexander Bluhm
On Fri, Aug 22, 2014 at 06:43:47PM +0200, Alexander Bluhm wrote: > At the moment syslogd opens both IPv4 and IPv6 sockets unconditionally. > I can restrict it to a protocol family with -4 and -6 command line > switches. If the log server is a FQDN, DNS chosses wether to take > the IPv4 or IPv6 rou

Re: syslogd ipv6 proto6

2014-08-22 Thread Alexander Bluhm
On Tue, Aug 19, 2014 at 01:59:42AM +0200, Alexander Bluhm wrote: > I will split this diff into smaller parts to make review and > discussion easier. At the moment syslogd opens both IPv4 and IPv6 sockets unconditionally. I can restrict it to a protocol family with -4 and -6 command line switches.

Re: syslogd ipv6 hostportlen

2014-08-21 Thread Alexander Bluhm
On Tue, Aug 19, 2014 at 01:59:42AM +0200, Alexander Bluhm wrote: > I will split this diff into smaller parts to make review and > discussion easier. Instead of getting a nasty error message from privsep syslogd: priv_getaddrinfo: overflow attempt in hostname check the host and port length when par

Re: syslogd ipv6 man5

2014-08-20 Thread Jason McIntyre
On Thu, Aug 21, 2014 at 01:39:55AM +0200, Alexander Bluhm wrote: > On Tue, Aug 19, 2014 at 01:59:42AM +0200, Alexander Bluhm wrote: > > I will split this diff into smaller parts to make review and > > discussion easier. > > Document square brackets for IPv6 addresses. From FreeBSD. > > Index: us

Re: syslogd ipv6 man5

2014-08-20 Thread Alexander Bluhm
On Tue, Aug 19, 2014 at 01:59:42AM +0200, Alexander Bluhm wrote: > I will split this diff into smaller parts to make review and > discussion easier. Document square brackets for IPv6 addresses. From FreeBSD. Index: usr.sbin/syslogd/syslog.conf.5 ==

Re: syslogd ipv6 socket

2014-08-20 Thread Alexander Bluhm
On Tue, Aug 19, 2014 at 01:59:42AM +0200, Alexander Bluhm wrote: > I will split this diff into smaller parts to make review and > discussion easier. Send and receive UDP syslog packets on the IPv6 socket. ok? bluhm Index: usr.sbin/syslogd/privsep.c ==

Re: syslogd ipv6 loghost

2014-08-20 Thread Alexander Bluhm
On Tue, Aug 19, 2014 at 01:59:42AM +0200, Alexander Bluhm wrote: > I will split this diff into smaller parts to make review and > discussion easier. Parse loghost in a separate function. Allow [] around hostname, needed for IPv6 addresses. Print full loghost specifier in case of error or debug.

Re: syslogd ipv6 getnameinfo

2014-08-20 Thread Jérémie Courrèges-Anglas
Alexander Bluhm writes: > On Tue, Aug 19, 2014 at 01:59:42AM +0200, Alexander Bluhm wrote: >> I will split this diff into smaller parts to make review and >> discussion easier. > > Replace gethostbyaddr(3) with getnameinfo(3). > > Note that I remove the sigprocmask() that was added in rev 1.23 >

Re: syslogd ipv6 getaddrinfo

2014-08-19 Thread Alexander Bluhm
On Tue, Aug 19, 2014 at 01:59:42AM +0200, Alexander Bluhm wrote: > I will split this diff into smaller parts to make review and > discussion easier. Rename priv_gethostserv() to priv_getaddrinfo() as this is what the function does. Change the return code semantics to match getaddrinfo(3). ok? b

Re: syslogd ipv6 getnameinfo

2014-08-19 Thread Alexander Bluhm
On Tue, Aug 19, 2014 at 01:59:42AM +0200, Alexander Bluhm wrote: > I will split this diff into smaller parts to make review and > discussion easier. Replace gethostbyaddr(3) with getnameinfo(3). Note that I remove the sigprocmask() that was added in rev 1.23 before privsep. It was necessary beca

Re: syslogd ipv6

2014-08-18 Thread Alexander Bluhm
On Tue, Aug 19, 2014 at 01:59:42AM +0200, Alexander Bluhm wrote: > I will split this diff into smaller parts to make review and > discussion easier. The exit codes in privsep.c seem to be the wrong way around. Fatal errors should exit with 1, and regular shutdown should result in exit with 0. I

Re: syslogd ipv6

2014-08-18 Thread Alexander Bluhm
On Tue, Aug 19, 2014 at 01:59:42AM +0200, Alexander Bluhm wrote: > I will split this diff into smaller parts to make review and > discussion easier. Replace manually written function names with __func__. This will make renaming functions easier. ok? bluhm Index: usr.sbin/syslogd/privsep.c ===

Re: syslogd ipv6

2014-08-18 Thread Alexander Bluhm
On Tue, Aug 19, 2014 at 01:59:42AM +0200, Alexander Bluhm wrote: > I will split this diff into smaller parts to make review and > discussion easier. Let's start with the easy part, fix trailing white spaces. ok? bluhm Index: usr.sbin/syslogd/syslogd.c ===

syslogd ipv6

2014-08-18 Thread Alexander Bluhm
Hi, I have added functionality that allows syslogd to receive and send UDP packets via inet6 sockets. I will split this diff into smaller parts to make review and discussion easier. bluhm Index: usr.sbin/syslogd/privsep.c === RCS f