vm/mix/net: fill QubesDB for already connected VMs
There may be cases when VM providing the network to other VMs is started later - for example VM restart. While this is rare case (and currently broken because of QubesOS/qubes-issues#1426), do not assume it will always be the case.
This commit is contained in:
parent
1187e43697
commit
297cb4d012
@ -443,9 +443,13 @@ class NetVMMixin(qubes.events.Emitter):
|
||||
|
||||
@qubes.events.handler('domain-qdb-create')
|
||||
def on_domain_qdb_create(self, event):
|
||||
''' Fills the QubesDB with firewall entries. Not implemented '''
|
||||
# SEE: 1815 fill firewall QubesDB entries
|
||||
pass
|
||||
''' Fills the QubesDB with firewall entries. '''
|
||||
# pylint: disable=unused-argument
|
||||
for vm in self.connected_vms:
|
||||
if vm.is_running():
|
||||
# keep in sync with on_firewall_changed
|
||||
self.set_mapped_ip_info_for_vm(vm)
|
||||
self.reload_firewall_for_vm(vm)
|
||||
|
||||
@qubes.events.handler('firewall-changed', 'domain-spawn')
|
||||
def on_firewall_changed(self, event, **kwargs):
|
||||
|
Loading…
Reference in New Issue
Block a user