[PATCH] ws2_32: Allow user to enable IP dual stack (v5).

Roman Pišl rpisl at seznam.cz
Tue Oct 18 06:57:25 CDT 2016


Ok, sorry, I wanted to give him a credit as my patch is only a fine-tuning of 
tests.

Is it really possible that get_sock_fd() can fail after a successfull 
create_socket request? What should be done if it fails, just skip setting the 
option?

Are these the only objections and should I send v6?

Thanks.

Roman

On Tuesday 18 of October 2016 19:30:53 Dmitry Timoshkov wrote:
> Roman Pišl <rpisl at seznam.cz> wrote:
> > IP dual stack (v4+v6) should be disabled by default, but previous code
> > was setting IPV6_V6ONLY in bind() which prevented user to override it.
> > This patch moves setting IPV6_V6ONLY to socket creation time.
> > 
> > V5 - fixes failing test on Windows
> > 
> > Based on
> > https://www.winehq.org/pipermail/wine-patches/2016-July/151919.html
> > 
> > Signed-off-by: Matthieu Nottale <matthieu.nottale at infinit.io>
> > Signed-off-by: Roman Pišl <rpisl at seznam.cz>
> 
> Probably you shouldn't add someone's else sign-off without the author's
> agreement, or mention that you've got an explicit agreement from the patch
> author otherwise.
> 
> > +#ifdef IPV6_V6ONLY
> > +        if (unixaf == AF_INET6)
> > +        {
> > +            int enable = 1;
> > +            int fd = get_sock_fd(ret, 0, NULL);
> > +            setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &enable,
> > sizeof(enable)); +        }
> > +#endif
> 
> It's better to verify that get_sock_fd() succeded before using its result,
> and call release_sock_fd() at the end.




More information about the wine-devel mailing list