2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

net: Put ifname and mtu on newlink request

The name will be valid for new veth, mtu has to be restored for all devices.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2012-08-10 17:31:03 +04:00
parent ff3770a22d
commit 9d18a851c2

3
net.c
View File

@@ -160,7 +160,8 @@ static int restore_one_link(NetDeviceEntry *nde, int nlsk)
req.i.ifi_index = nde->ifindex;
req.i.ifi_flags = nde->flags;
/* FIXME -- restore mtu as well */
addattr_l(&req.h, sizeof(req), IFLA_IFNAME, nde->name, strlen(nde->name));
addattr_l(&req.h, sizeof(req), IFLA_MTU, &nde->mtu, sizeof(nde->mtu));
pr_info("Restoring netdev idx %d\n", nde->ifindex);
return do_rtnl_req(nlsk, &req, req.h.nlmsg_len, restore_link_cb, NULL);