[CRIU] Re: [PATCH cr 2/2] sk-inet: save the socket option IPV6_V6ONLY

Pavel Emelyanov xemul at parallels.com
Mon Aug 13 07:56:58 EDT 2012


On 08/13/2012 03:50 PM, Andrey Vagin wrote:
> 
> Most part of services (ssh, httpd, ...) create two separate sockets
> one for ipv4 and one for ipv6. If IPV6_V6ONLY isn't dumped, bind() returns
> EADDRINUSE
> 
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
>  protobuf/sk-inet.proto |    1 +
>  sk-inet.c              |   16 ++++++++++++++++
>  2 files changed, 17 insertions(+), 0 deletions(-)
> 

> +	if (ii->ie->v6only) {
> +		int yes;

yes = 1 ?

> +		if (setsockopt(sk, SOL_IPV6, IPV6_V6ONLY, &yes, sizeof(int)) == -1 ) {

do_restore_opt

> +			pr_perror("setsockopt(SOL_IPV6, IPV6_V6ONLY) error");
> +			return -1;
> +		}
> +	}
> +



More information about the CRIU mailing list