提交 b9e1f11a 编写于 作者: S Soren Hansen 提交者: Eric Blake

Make umlConnectTapDevice ask brAddTap for a persistent tap device.

This patch does two things:

 * It makes umlConnectTapDevice ask brAddTap for a persistent tap by
   passing it a NULL tapfd argument.
 * Stops umlConnectTapDevice from immediately dismantling the bridge
   it just set up.
Signed-off-by: NSoren Hansen <soren@linux2go.dk>
上级 4358f76a
......@@ -112,7 +112,6 @@ umlConnectTapDevice(virDomainNetDefPtr net,
const char *bridge)
{
brControl *brctl = NULL;
int tapfd = -1;
int template_ifname = 0;
int err;
unsigned char tapmac[VIR_MAC_BUFLEN];
......@@ -140,7 +139,7 @@ umlConnectTapDevice(virDomainNetDefPtr net,
&net->ifname,
tapmac,
0,
&tapfd))) {
NULL))) {
if (err == ENOTSUP) {
/* In this particular case, give a better diagnostic. */
umlReportError(VIR_ERR_INTERNAL_ERROR,
......@@ -164,7 +163,6 @@ umlConnectTapDevice(virDomainNetDefPtr net,
VIR_FREE(net->ifname);
goto error;
}
close(tapfd);
brShutdown(brctl);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册