提交 b68a56bc 编写于 作者: M Michal Privoznik

virDomainActualNetDefContentsFormat: Format class_id more frequently

After a3609121 the formatting of virDomainActualNetDefPtr was
changed a bit. However, during the function rewrite, iface's class_id
is not formatted as frequently as it could be. In fact, after rewrite
it's formatted only for iface of type VIR_DOMAIN_NET_TYPE_DIRECT where
it makes no sense and is unused. While where needed (_TYPE_NETWORK) is
not formatted at all. This makes the daemon forget it upon daemon
restart resulting in bad behaviour.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 77d92e2e
......@@ -18608,8 +18608,7 @@ virDomainActualNetDefContentsFormat(virBufferPtr buf,
virBufferAddLit(buf, "/>\n");
}
if (actualType == VIR_DOMAIN_NET_TYPE_DIRECT &&
def->data.network.actual && def->data.network.actual->class_id) {
if (def->data.network.actual && def->data.network.actual->class_id) {
virBufferAsprintf(buf, "<class id='%u'/>\n",
def->data.network.actual->class_id);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册