[CRIU] [PATCH] Allow criu page-server to work over ipv6.

Radostin Stoyanov rstoyanov1 at gmail.com
Thu Aug 30 16:03:06 MSK 2018


On 07/06/18 11:32, Pawel Stradomski wrote:
> +		if (saddr.ss_family == AF_INET6) {
> +			opts.port = ntohs(((struct sockaddr_in *)&saddr)->sin_port);
> +		} else if (saddr.ss_family == AF_INET) {
> +			opts.port = ntohs(((struct sockaddr_in6 *)&saddr)->sin6_port);
> +		}
> +

This patch has been merged into master but I noticed this part from
setup_tcp_server() in util.c
and I was wondering if the logic in this condition should be reversed?

For example:
       
  if (saddr.ss_family == AF_INET6) {
    opts.port = ntohs(((struct sockaddr_in6 *)&saddr)->sin6_port);
  } else if (saddr.ss_family == AF_INET) {
    opts.port = ntohs(((struct sockaddr_in *)&saddr)->sin_port);
  }

Thanks,
Radostin


More information about the CRIU mailing list