If the firewall rules file does not exist, assume ALLOW (#188)

So that newly created appvms have net access.
This commit is contained in:
Rafal Wojtczuk 2011-04-04 17:07:46 +02:00
parent 936ce590ac
commit 02514b1347

View File

@ -1390,13 +1390,16 @@ class QubesProxyVm(QubesNetVm):
qvm_collection.load()
qvm_collection.unlock_db()
vms = [vm for vm in qvm_collection.values() if vm.has_firewall()]
vms = [vm for vm in qvm_collection.values()]
for vm in vms:
# Process only VMs connected to this ProxyVM
if not vm.netvm_vm or vm.netvm_vm.qid != self.qid:
continue
if vm.has_firewall():
conf = vm.get_firewall_conf()
else:
conf = { "rules": list(), "allow": True, "allowDns": True, "allowIcmp": True }
xid = vm.get_xid()
if xid < 0: # VM not active ATM