mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 13:28:27 +00:00
netdevconf: remove redundant and unsafe check
we don't need this check as just after it we have: if (ret) break; which safely unpackes nde, and closes nlsk and img in case of error ps: sorry for inconveniences caused by my patchset Signed-off-by: Pavel Tikhomirov <ptikhomirov@odin.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
b87ae730fc
commit
dfa96b5514
5
net.c
5
net.c
@ -478,16 +478,13 @@ static int restore_links(int pid, NetnsEntry **netns)
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nde->conf) {
|
if (nde->conf)
|
||||||
/*
|
/*
|
||||||
* optimize restore of devices configuration except lo
|
* optimize restore of devices configuration except lo
|
||||||
* lo is created with namespace and before default is set
|
* lo is created with namespace and before default is set
|
||||||
* so we cant optimize its restore
|
* so we cant optimize its restore
|
||||||
*/
|
*/
|
||||||
ret = ipv4_conf_op(nde->name, nde->conf, CTL_WRITE, nde->type == ND_TYPE__LOOPBACK ? NULL : netns);
|
ret = ipv4_conf_op(nde->name, nde->conf, CTL_WRITE, nde->type == ND_TYPE__LOOPBACK ? NULL : netns);
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
exit:
|
exit:
|
||||||
net_device_entry__free_unpacked(nde, NULL);
|
net_device_entry__free_unpacked(nde, NULL);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user