Commit 05ac45b1 authored by Tycho Andersen's avatar Tycho Andersen Committed by Pavel Emelyanov

veth: fix off by one error

0e869bf82f30ff6bce3d7cdc66779d8b642c82af introduces this bug, which chops
off the last character of the external veth name, and then subsequent
move_veth_to_bridge() calls fail:

(01.012478) Error (criu/net.c:1758): Can't get index of veth69A67O: No such device

travis-ci: success for veth: fix off by one error
Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
CC: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 36343f19
......@@ -916,7 +916,7 @@ static void veth_peer_info(NetDeviceEntry *nde, struct newlink_req *req)
char *aux;
aux = strchrnul(val, '@');
addattr_l(&req->h, sizeof(*req), IFLA_IFNAME, val, aux - val - 1);
addattr_l(&req->h, sizeof(*req), IFLA_IFNAME, val, aux - val);
}
}
......
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