diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c index 40345d58034861962beacf8b85faa9e4e10bfb2a..9101928bffd8f7c2b59f517aeaa54b999c8e9c47 100644 --- a/src/uml/uml_driver.c +++ b/src/uml/uml_driver.c @@ -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; }