bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-inetutils] Draft of IPv6 changes for syslogd.


From: Mats Andersson
Subject: [bug-inetutils] Draft of IPv6 changes for syslogd.
Date: Tue, 19 Jul 2011 14:06:04 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Dear all,

having recently pushed on my responsibility two error
corrections concerning 'syslogd', I am now able to offer
for discussion a change set that implements full IPv6
capability in 'syslogd'. As the changes are now more
intrusive, I would like comments before pushing any
changes at all. Suffice it to say that the present
test script verifies dual stacked functionality.
(Just remember to have a remote system listening
to your forwarded messages!)

Let me mention the changes and techniques used:

 1. New command line options for INET transport:

      -4/--ipv4 (default), -6/--ipv6, --ipany

    Using '--ipany' corresponds to AF_UNSPEC,
    allowing the resolver to use A and AAAA
    records.

The default (--ipv4) is still set in order not to break
present day installations. In itself is depends on a
single assignment, but a change might upset the flow
for a remote loghost that resolves for IPv4 and IPv6,
but only listens for syslog/IPv4.

 2. A new option '-b/--bind=ADDR' allowing at most
    a dual stacked listening pair. Either a single
    address is given, or a host name is resolved.

    The latter results in a single address with
    either of '--ipv4/--ipv6', but one address
    for each address family, should the given host
    name possess an A as well as an AAAA record.

 3. The present code uses a single file destriptor
    'int finet' to hold the AF_INET descriptor.
    This is now replaced with a pair 'int finet[2]',
    one for each address family, and each socket
    being single stacked (for better portability).

 4. The option '-r/--inet' is now independent of
    the implicit option '--forward', since without
    the former switch being active, the server will
    produce on-demand sockets in order to forward
    messages to remote loghosts. Unless, that is,
    the local service was started using '--no-forward'!

This last change was implemented in rev 13af03e2 (present HEAD),
with the present changes in mind.

The code changes are surprisingly small to accomplish these
alterations, but the multitude of setups needed to test
all possible use cases calls for great care during evaluation.

Let me state once more, that I have with intention chosen
to code the server into using two single stacked sockets,
one each for AF_INET and AF_INET6, in order to achieve
complete predictability regarding the option IPV6_V6ONLY,
be it active or not on the running system. Remember that
its value can not be changed on a running OpenBSD system,
and that it is almost always set in OpenBSD!

Take your time when reading this draft. The attached patch
can be tested, except that 'unused-parameter.h' needs to
be manually copied from GNUlib to our 'lib/'.

Best regards
  Mats

Attachment: draft_ipv6_syslog.diff
Description: Text Data

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]