On 10/15/18 4:26 AM, Nikolay Shirokovskiy wrote:
Before using filters binding filters instantiation was done by
hypervisors
drivers initialization code (qemu was the only such hypervisor). Now qemu
reconnection done supposes it should be done by nwfilter driver probably.
Let's add this missing step.
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy(a)virtuozzo.com>
---
src/nwfilter/nwfilter_driver.c | 3 +++
1 file changed, 3 insertions(+)
If there's research you've done where the instantiation was done before
introduction of the nwfilter bindings that would be really helpful...
I found that virNWFilterBuildAll was introduced in commit 3df907bfff.
There were 2 callers for it:
1. virNWFilterTriggerRebuildImpl
2. nwfilterStateReload
The former called as part of the virNWFilterConfLayerInit callback
during nwfilterStateInitialize (about 50 lines earlier).
So how does calling this now w/ @false help things during the state
initialize processing?
John
diff --git a/src/nwfilter/nwfilter_driver.c
b/src/nwfilter/nwfilter_driver.c
index 1ee5162..1ab906f 100644
--- a/src/nwfilter/nwfilter_driver.c
+++ b/src/nwfilter/nwfilter_driver.c
@@ -264,6 +264,9 @@ nwfilterStateInitialize(bool privileged,
if (virNWFilterBindingObjListLoadAllConfigs(driver->bindings,
driver->bindingDir) < 0)
goto error;
+ if (virNWFilterBuildAll(driver, false) < 0)
+ goto error;
+
nwfilterDriverUnlock();
return 0;