Store the state of FwVM rules

This commit is contained in:
Tomasz Sterna 2011-03-09 18:07:22 +01:00
parent fd8ecca9bd
commit 6ad91617a7

View File

@ -933,6 +933,7 @@ class QubesFirewallVm(QubesNetVm):
""" """
def __init__(self, **kwargs): def __init__(self, **kwargs):
super(QubesFirewallVm, self).__init__(uses_default_netvm=False, **kwargs) super(QubesFirewallVm, self).__init__(uses_default_netvm=False, **kwargs)
self.rules_applied = None
@property @property
def type(self): def type(self):
@ -1021,6 +1022,7 @@ class QubesFirewallVm(QubesNetVm):
iptables += "COMMIT" iptables += "COMMIT"
self.rules_applied = None
return subprocess.check_call ([ return subprocess.check_call ([
"/usr/bin/xenstore-write", "/usr/bin/xenstore-write",
"/local/domain/{0}/qubes_iptables".format(self.get_xid()), "/local/domain/{0}/qubes_iptables".format(self.get_xid()),