[CRIU] [PATCH v4 7/8] restore net device ipv4 confs

Pavel Emelyanov xemul at parallels.com
Wed Oct 8 08:31:12 PDT 2014


On 10/08/2014 05:21 PM, Pavel Tikhomirov wrote:
> Signed-off-by: Pavel Tikhomirov <ptikhomirov at parallels.com>
> ---
>  net.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/net.c b/net.c
> index 30b9e4c..68ba5a2 100644
> --- a/net.c
> +++ b/net.c
> @@ -473,6 +473,15 @@ static int restore_links(int pid)
>  			break;
>  
>  		ret = restore_link(nde, nlsk);
> +		if (ret) {
> +			pr_err("can not restore link");
> +			goto exit;
> +		}
> +
> +		ret = ipv4_conf_op(nde->name, nde->conf, CTL_WRITE);

There can be zero confs for the device.

> +		if (ret < 0)
> +			pr_err("failed to set net device ipv4 conf\n");
> +exit:
>  		net_device_entry__free_unpacked(nde, NULL);
>  		if (ret)
>  			break;
> 



More information about the CRIU mailing list