From accfdcb61fdd11597fd5e159c107d382d0c5f374 Mon Sep 17 00:00:00 2001 From: Giulio Date: Tue, 13 Jul 2021 10:26:04 +0200 Subject: [PATCH] Fix basic errors found on testing --- qubes/firewall.py | 2 +- qubes/vm/mix/net.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/qubes/firewall.py b/qubes/firewall.py index e32c4b51..2ecd976e 100644 --- a/qubes/firewall.py +++ b/qubes/firewall.py @@ -689,7 +689,7 @@ class Firewall: entries['{:04}'.format(ruleno)] = rule.rule return entries - def qdb_forward_entries(self, addr_family=None, type): + def qdb_forward_entries(self, addr_family=None, type="internal"): ''' In order to keep all the 'parsing' logic here and not in net.py, directly separate forwarding rules from standard rules since they need to be handled differently later. diff --git a/qubes/vm/mix/net.py b/qubes/vm/mix/net.py index fac602a2..ee9e20a2 100644 --- a/qubes/vm/mix/net.py +++ b/qubes/vm/mix/net.py @@ -398,11 +398,12 @@ class NetVMMixin(qubes.events.Emitter): self.untrusted_qdb.rm(base_dir) # write new forward rules for key, value in vm.firewall.qdb_forward_entries( - addr_family=addr_family, "internal").items(): + addr_family=addr_family, type="internal").items(): + print() # code here # signal its done for key, value in vm.firewall.qdb_forward_entries( - addr_family=addr_family, "external").items(): + addr_family=addr_family, type="external").items(): # to fix for netvm in netpath: self.untrusted_qdb.write(base_dir + key, value)