bug-inetutils
[Top][All Lists]
Advanced

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

[bug-inetutils] Re: [PATCH] Implement IPv6 capability for the TFTP serve


From: Simon Josefsson
Subject: [bug-inetutils] Re: [PATCH] Implement IPv6 capability for the TFTP server.
Date: Mon, 27 Sep 2010 13:23:03 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux)

Mats Erik Andersson <address@hidden> writes:

> Let me for free provide a strong reason to reject also the new patch,
> a patch with which I myself am content:
>
>    There is no trace of conditioning the changes on either of
>
>        IPV6
>        HAVE_IPV6
>        HAVE_DECL_GETADDRINFO
>        HAVE_DECL_FREEGETADDRINFO
>        HAVE_DECL_GAI_STRERROR
>        HAVE_DECL_GETNAMEINFO
>        HAVE_STRUCT_SOCKADDR_STORAGE
>        
>    so my suggestion fails to compile on any machine where IPv6
>    is not supported!
>
> The particular files, "libinetutils/tftpsubs.c" and "src/tftpd.c", are
> manageable in size to rework to recover from this calamity, but the other
> contribution of mine on "src/tftp.c" is already so much more involved
> that it is clearly less stimulating to rework the patching. Not to
> mention "ftp/*" and "ftpd/*", my next goals. Making them fit for
> systems with IPv6, and those with only IPv4, that is some serious major
> work. Believe me, I have already patched linux-ftpd/netkit-ftpd and
> netkit-ftp for Debian GNU/Linux, where I was allowed to assume the
> presence of IPv6 support.
>
> Could I get to hear some wise words on principles here? May IPv6 code
> be implemented and committed first, and then afterwards be refined to
> reimplement the fixes to take care of IPv4-only systems, or must both
> settings be coped with in one single go? The answer will seriously
> affect the labour and the pace with which the needed changes can be
> implemented.

I don't have a strong opinion here, but generally prefer to get stuff
into the repository rather than waiting forever.

However what I'd like to point out is that you shouldn't have to
condition anything on the getaddrinfo stuff -- gnulib will provide a
working getaddrinfo (+ friends) for platforms that doesn't have it.

Generally, your code should assume a POSIX with GNU-extensions platform.
If any real-world platforms doesn't behave like that, gnulib is there to
isolate any platform specific quirks.

What kind of code do you have that condition on IPV6/HAVE_IPV6?  It may
be possible to rewrite it in a protocol independent way.

/Simon



reply via email to

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