[CRIU] [PATCH] Allow criu page-server to work over ipv6.
Paweł Stradomski
pstradomski at google.com
Thu Aug 30 16:08:10 MSK 2018
Indeed, looks wrong. It works merely by accident - both structs have port
field at the same offset.
czw., 30 sie 2018 o 15:03 Radostin Stoyanov <rstoyanov1 at gmail.com>
napisał(a):
> 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
>
--
Paweł Stradomski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20180830/70abb4aa/attachment-0001.html>
More information about the CRIU
mailing list