提交 a923865a 编写于 作者: J Jiri Denemark

virsh iface-bridge: Ignore delay if stp is turned off

Delay only makes sense with STP enabled.
上级 4db39e3f
...@@ -894,7 +894,7 @@ cmdInterfaceBridge(vshControl *ctl, const vshCmd *cmd) ...@@ -894,7 +894,7 @@ cmdInterfaceBridge(vshControl *ctl, const vshCmd *cmd)
goto cleanup; goto cleanup;
} }
if ((delay || stp) && if (stp &&
((virAsprintf(&delay_str, "%d", delay) < 0) || ((virAsprintf(&delay_str, "%d", delay) < 0) ||
!xmlSetProp(br_node, BAD_CAST "delay", BAD_CAST delay_str))) { !xmlSetProp(br_node, BAD_CAST "delay", BAD_CAST delay_str))) {
vshError(ctl, _("Failed to set bridge delay %d in xml document"), delay); vshError(ctl, _("Failed to set bridge delay %d in xml document"), delay);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册