From 4d8fd0253bb78fdcb6cce173c823874c6e20812d Mon Sep 17 00:00:00 2001 From: Pawel Marczewski Date: Thu, 9 Jan 2020 16:23:43 +0100 Subject: [PATCH] Also reload /connected-ips on firewall change / domain spawn There are scenarios where it turns out to be necessary, such as enabling IPv6 on a machine causing it to acquire an IPv6 address. --- qubes/vm/mix/net.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qubes/vm/mix/net.py b/qubes/vm/mix/net.py index 4b41d8d8..a5e3f0e5 100644 --- a/qubes/vm/mix/net.py +++ b/qubes/vm/mix/net.py @@ -479,10 +479,11 @@ class NetVMMixin(qubes.events.Emitter): def on_domain_qdb_create(self, event): ''' Fills the QubesDB with firewall entries. ''' # pylint: disable=unused-argument + + # Keep the following in sync with on_firewall_changed. self.reload_connected_ips() 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) @@ -491,6 +492,7 @@ class NetVMMixin(qubes.events.Emitter): ''' Reloads the firewall if vm is running and has a NetVM assigned ''' # pylint: disable=unused-argument if self.is_running() and self.netvm: + self.netvm.reload_connected_ips() self.netvm.set_mapped_ip_info_for_vm(self) self.netvm.reload_firewall_for_vm(self) # pylint: disable=no-member