提交 5d39a491 编写于 作者: A Alvaro Polo 提交者: Peter Krempa

openvz: Fix code coverage issue in OpenVZ driver

After fixing an invalid usage of virDomainNetDef in OpenVZ driver,
a coverage issue appeared. This was caused by a still invalid usage
of net->data.ethernet.dev for non ethernet networking.
上级 e5fa9db1
......@@ -859,7 +859,7 @@ openvzDomainSetNetwork(virConnectPtr conn, const char *vpsid,
/* if user doesn't specified host interface name,
* than we need to generate it */
if (net->ifname == NULL) {
net->ifname = openvzGenerateVethName(veid, net->data.ethernet.dev);
net->ifname = openvzGenerateVethName(veid, guest_ifname);
if (net->ifname == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not generate veth name"));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册