bug-inetutils
[Top][All Lists]
Advanced

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

Re: [bug-inetutils] [PATCH] Make `logger' IPv6-capable.


From: Mats Erik Andersson
Subject: Re: [bug-inetutils] [PATCH] Make `logger' IPv6-capable.
Date: Wed, 19 Jan 2011 02:04:56 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

tisdag den 18 januari 2011 klockan 12:19 skrev Alfred M. Szmidt detta:
> 
> If something is wraped around a CPP conditional, then we can write:
> 
> (open_socket) [HAVE_DECL_GETADDRINFO && HAVE_IPV6]: ...

Good. Adapted in new patch suggestion.

> 
>    @@ -244,6 +371,10 @@ const char args_doc[] =3D "[MESSAGE]";
>     const char doc[] =3D "Send messages to syslog";
>    =20
>     static struct argp_option argp_options[] =3D {
>    +#if HAVE_IPV6
>    +  {"ipv4", '4', NULL, 0, "use IPv4 for logging to host" },
>    +  {"ipv6", '6', NULL, 0, "use IPv6 with a host target" },
>    +#endif
> 
> What do you think about issuing a warning if IPv6 is not supported,
> and falling back on IPv4?  It is nice if one can move scripts between
> systems, without having to tweak them.  Mayve skip the two short
> options, they don't seem to be very useful to me; or do other logger
> implementations support them?

This is a splendid idea. Now both are implemented, but '--ipv6' prints
a warning message to STDOUT and falls back to IPv4 if the system is
not compiled with IPv6 support.

FreeBSD implements options '-4' and '-6', but not long options.
OpenBSD, NetBSD, and bsdutils (hence Debian GNU/Linux and GNU/kFreeBSD)
are not able to send log messages to a host at all, only to UNIX sockets!
In this sense IU-logger is at the very forefront.

Doing this revision I did improve on the informative content for
the error messages that can be generated from my code. In addition,
I managed to cover for a segfault in libc-freebsd, which is forgiven
bt glibc, so the additional wark payed off very well.

A revised patch suggestion is included. Again tested on Linux, OpenBSD,
FreeBSD, and kFreeBSD. Using "#undef HAVE_IPV6" I did even simulate
crippled systems. The fallback mechanism works well.

Best regards,
  Mats

Attachment: 0001-logger-Implement-support-for-transport-via-IPv6.patch
Description: Text Data

Attachment: signature.asc
Description: Digital signature


reply via email to

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