libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] Patch to improve IPv6 support in libmicrohttpd


From: Christian Grothoff
Subject: Re: [libmicrohttpd] Patch to improve IPv6 support in libmicrohttpd
Date: Mon, 16 Jan 2012 14:31:46 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111114 Icedove/3.1.16

On 01/16/2012 10:31 AM, Steinar H. Gunderson wrote:
On Sun, Jan 15, 2012 at 05:11:14PM +0100, Christian Grothoff wrote:
0.4.6? You got to be kidding me.  We're at 0.9.17, 0.4.6 is about 2
years old.
That's the joy of being on Debian stable, I guess :-)

More importantly, the patch is overall not taking the
code in the right direction.  The modern, recommended way to do
dual-stack IPv6 is what MHD already supports: use two listen
sockets.
I don't know who's been recommending this, but it's certainly not the
majority opinion in the Internet community at large. However, I guess trying
to convince you would not be a very productive endeavor -- it's a contendable
point, and it's your code.

IPv4-compatible IPv6 addresses are used for the dualstack sockets you propose to use:
http://tools.ietf.org/html/rfc3493#page-22

But, IPv4-compatible IPv6 addresses are now deprecated:

http://tools.ietf.org/html/rfc4291#section-2.5.5

Also, as discussed here

http://stackoverflow.com/questions/2693709/what-was-the-motivation-for-adding-the-ipv6-v6only-flag

you will find that "Specifically Windows XP/2003 does not support dualstack sockets."

So for portability, having two sockets and using IPV6_ONLY is a good idea as well.


In conclusion, I cannot show that my decision is the "majority" of the Internet community at large (I'm pretty sure the majority has no opinion on this technical detail), but it is well-founded and in line with IETF recommendations.

How would using two sockets look like from a client's point of view?
Do you have an API example?

Now I do. I've modified the "minimal_example.c" from src/examples/ to make it dual-stack. As you can see, the changes are trivial.

Happy hacking,

-Christian

Attachment: dual_stack_example.c
Description: Text Data


reply via email to

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