Fix basic errors found on testing

This commit is contained in:
Giulio 2021-07-13 10:26:04 +02:00
parent 787cb1170b
commit accfdcb61f
2 changed files with 4 additions and 3 deletions

View File

@ -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.

View File

@ -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)