On 01/04/2011 04:43 AM, Magnus Hagander wrote:
>
>> OK, what's going here is that, in the newer SDK, IPV6_V6ONLY is defined
>> unconditionally, but IPPROTO_IPV6 is only defined if _WIN32_WINNT is set to
>> 0x0501 or higher. We defined _WIN32_WINNT as 0x0500 until 9.0, when we
>> changed it specifically to allow use of the right IPV6 settings.
> I wonder if anything else changed with that #define, though.
Probably. I'm not going to suggest turning it on at this stage. There
are lots of references to this specific OS level in the headers.
>
>> This seems to me like a clear error in the MS headers. I don't think it
>> makes any sense to define the settings constant but not the context
>> constant. The fix I have suggested above doesn't seem unreasonable or
>> terribly unsafe in these circumstances. The code clearly contemplates the
>> setsockopt() call in question not having been run, as shown in this comment:
> Yeah, it seems reasonable - I assume you tested it and it doesn't fail
> in some *different* way than the one we expect in the code?
>
Yes, I enabled IPV6 and set listen_addresses to * an no untoward events
appeared.
cheers
andrew