mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
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: Soren Hansen <soren@linux2go.dk>
This commit is contained in:
parent
fc3247f211
commit
38ba6e16ea
@ -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(¨Driver);
|
||||
virRegisterStateDriver(¨StateDriver);
|
||||
virNWFilterRegisterCallbackDriver(¨CallbackDriver);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user