---
src/conf/interface_conf.c | 11 +++++++----
src/conf/interface_conf.h | 1 +
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c
index 3c99027..ca82208 100644
--- a/src/conf/interface_conf.c
+++ b/src/conf/interface_conf.c
@@ -801,6 +801,7 @@ virInterfaceDefParseXML(virConnectPtr conn, xmlXPathContextPtr ctxt)
{
}
VIR_FREE(tmp);
}
+ def->data.bridge.delay = virXMLPropString(bridge, "delay");
ctxt->node = bridge;
virInterfaceDefParseBridge(conn, def, ctxt);
break;
@@ -1038,12 +1039,14 @@ virInterfaceBridgeDefFormat(virConnectPtr conn, virBufferPtr buf,
int i;
int ret = 0;
+ virBufferAddLit(buf, " <bridge");
if (def->data.bridge.stp == 1)
- virBufferAddLit(buf, " <bridge stp='on'>\n");
+ virBufferAddLit(buf, " stp='on'");
else if (def->data.bridge.stp == 0)
- virBufferAddLit(buf, " <bridge stp='off'>\n");
- else
- virBufferAddLit(buf, " <bridge>\n");
+ virBufferAddLit(buf, " stp='off'");
+ if (def->data.bridge.delay != NULL)
+ virBufferVSprintf(buf, " delay='%s'",
def->data.bridge.delay);
+ virBufferAddLit(buf, ">\n");
for (i = 0;i < def->data.bridge.nbItf;i++) {
if (virInterfaceBareDevDefFormat(conn, buf, def->data.bridge.itf[i])
diff --git a/src/conf/interface_conf.h b/src/conf/interface_conf.h
index 2683eee..4216087 100644
--- a/src/conf/interface_conf.h
+++ b/src/conf/interface_conf.h
@@ -97,6 +97,7 @@ typedef struct _virInterfaceBridgeDef virInterfaceBridgeDef;
typedef virInterfaceBridgeDef *virInterfaceBridgeDefPtr;
struct _virInterfaceBridgeDef {
int stp; /* 0, 1 or -1 if undefined */
+ char *delay;
int nbItf; /* number of defined interfaces */
virInterfaceBareDefPtr *itf;/* interfaces */
};
--
1.6.6.rc2.5.g49666