提交 1d9ab0f0 编写于 作者: M Michal Privoznik

qemu: Allow empty script path to <interface/>

Before 9c17d665 (v1.3.2 - I know, right?) it was possible to
have the following interface configuration:

  <interface type='ethernet'/>
    <script path=''/>
  </interface>

This resulted in -netdev tap,script=,.. Fortunately, qemu helped
us to get away with this as it just ignored the empty script
path. However, after the commit mentioned above it's libvirtd
who is executing the script. Unfortunately without special
case-ing empty script path.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 d23dfaae
......@@ -145,6 +145,16 @@
libxl: fix dom0 autoballooning with Xen 4.8
</summary>
</change>
<change>
<summary>
qemu: Allow empty script path to &lt;interface/&gt;
</summary>
<description>
Historically, this was always allowed. Unfortunately, due to some
rework done for 1.3.2 release a bug was dragged in which suddenly
stop allowing domain with such configuration to start.
</description>
</change>
</section>
</release>
<release version="v3.0.0" date="2017-01-17">
......
......@@ -2615,6 +2615,10 @@ virNetDevRunEthernetScript(const char *ifname, const char *script)
virCommandPtr cmd;
int ret;
/* Not a bug! Previously we did accept script="" as a NO-OP. */
if (STREQ(script, ""))
return 0;
cmd = virCommandNew(script);
virCommandAddArgFormat(cmd, "%s", ifname);
virCommandClearCaps(cmd);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册