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

Rebuild network filter for UML guests on updates

When nwfilter support was added to UML, I didn't realise the UML driver
needed instrumentation to make updating nwfilters on the fly work. This
patch adds this bit of glue.
Signed-off-by: NSoren Hansen <soren@linux2go.dk>
上级 fc3247f2
......@@ -2198,6 +2198,18 @@ static virDriver umlDriver = {
NULL, /* qemuDomainMonitorCommand */
};
static int
umlVMFilterRebuild(virConnectPtr conn ATTRIBUTE_UNUSED,
virHashIterator iter, void *data)
{
struct uml_driver *driver = uml_driver;
umlDriverLock(driver);
virHashForEach(uml_driver->domains.objs, iter, data);
umlDriverUnlock(driver);
return 0;
}
static virStateDriver umlStateDriver = {
.name = "UML",
......@@ -2207,8 +2219,14 @@ static virStateDriver umlStateDriver = {
.active = umlActive,
};
static virNWFilterCallbackDriver umlCallbackDriver = {
.name = "UML",
.vmFilterRebuild = umlVMFilterRebuild,
};
int umlRegister(void) {
virRegisterDriver(&umlDriver);
virRegisterStateDriver(&umlStateDriver);
virNWFilterRegisterCallbackDriver(&umlCallbackDriver);
return 0;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册