Skip to content

Commit

Permalink
veth: fix off by one error
Browse files Browse the repository at this point in the history
0e869bf 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: Tycho Andersen <tycho.andersen@canonical.com>
CC: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
  • Loading branch information
Tycho Andersen authored and xemul committed Nov 3, 2016
1 parent 36343f1 commit 05ac45b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion criu/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 05ac45b

Please sign in to comment.