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;
|
||||
}
|
||||
|
||||
if (nde->conf) {
|
||||
if (nde->conf)
|
||||
/*
|
||||
* optimize restore of devices configuration except lo
|
||||
* lo is created with namespace and before default is set
|
||||
* so we cant optimize its restore
|
||||
*/
|
||||
ret = ipv4_conf_op(nde->name, nde->conf, CTL_WRITE, nde->type == ND_TYPE__LOOPBACK ? NULL : netns);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
exit:
|
||||
net_device_entry__free_unpacked(nde, NULL);
|
||||
if (ret)
|
||||
|
Loading…
x
Reference in New Issue
Block a user