[CRIU] [PATCH] tcp: dump and restore tcp_timestamp for each socket

Pavel Emelyanov xemul at parallels.com
Thu Feb 14 08:44:13 EST 2013


> @@ -252,6 +257,15 @@ static int tcp_stream_get_options(int sk, TcpStreamEntry *tse)
>  		tse->has_rcv_wscale = true;
>  	}
>  
> +	if (ti.tcpi_options & TCPI_OPT_TIMESTAMPS) {
> +		auxl = sizeof(val);
> +		ret = getsockopt(sk, SOL_TCP, TCP_TIMESTAMP, &val, &auxl);
> +		if (ret < 0)
> +			goto err_sopt;

This will fail on 3.8 since the sockoption in question is merged in 3.9-rc

> +		tse->has_timestamp = true;
> +		tse->timestamp = val;
> +	}
> +
>  	pr_info("\toptions: mss_clamp %x wscale %x tstamp %d sack %d\n",
>  			(int)tse->mss_clamp,
>  			ti.tcpi_options & TCPI_OPT_WSCALE ? (int)tse->snd_wscale : -1,

Plus need the crtools check stuff for this.


More information about the CRIU mailing list