Commit b88d8e1b authored by Pavel Emelyanov's avatar Pavel Emelyanov

net: Don't specify link index when restoring its params

Well, when we create external link with ip utility we cannot
specify its index. Thus we will not be able to move external
device to namespace and ask criu to restore link params.

However, RTM_SETLINK can happily work with the link name only.
And since we do have one in the images, we can omit setting
the index in the requrest.

TODO: Send patch with index specification to iproute2.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 70bb57e2
......@@ -256,7 +256,8 @@ static int do_rtm_link_req(int msg_type, NetDeviceEntry *nde, int nlsk,
req.h.nlmsg_type = msg_type;
req.h.nlmsg_seq = CR_NLMSG_SEQ;
req.i.ifi_family = AF_PACKET;
req.i.ifi_index = nde->ifindex;
if (msg_type == RTM_NEWLINK)
req.i.ifi_index = nde->ifindex;
req.i.ifi_flags = nde->flags;
addattr_l(&req.h, sizeof(req), IFLA_IFNAME, nde->name, strlen(nde->name));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment