From 092c8924c96c3f99d3f2c8d728d0d43de0ad465c Mon Sep 17 00:00:00 2001 From: Ian Southam Date: Thu, 13 Nov 2014 12:06:15 +0100 Subject: [PATCH] Bug corrections --- systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py | 2 +- systemvm/patches/debian/config/opt/cloud/bin/cs/CsNetfilter.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py index df88772a9d7..ed0d4d3ec75 100644 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py @@ -295,7 +295,7 @@ class CsIP: self.fw.append(["filter", "", "-A INPUT -i %s -p tcp -m tcp --dport 53 -j ACCEPT" % self.dev]) self.fw.append(["filter", "", "-A INPUT -s %s -i %s -p tcp -m state --state NEW" + "-m tcp --dport 8080 -j ACCEPT" % (self.address['network'], self.dev)]) - self.fw.append(["filter", "", "-A INPUT -i %s -p tcp -m tcp --dport 80 -m state --state NEW -j ACCEPT" self.dev]) + self.fw.append(["filter", "", "-A INPUT -i %s -p tcp -m tcp --dport 80 -m state --state NEW -j ACCEPT" % self.dev]) self.fw.append(["filter", "", "-A FORWARD -i %s -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT" % self.dev]) self.fw.append(["filter", "", "-A FORWARD -i %s -o %s -m state --state NEW -j ACCEPT" % self.dev]) self.fw.append(["filter", "", "-A FORWARD -i eth2 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT"]) diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsNetfilter.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsNetfilter.py index 497c44402ea..97f47f8c059 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsNetfilter.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsNetfilter.py @@ -35,6 +35,8 @@ class CsChain(object): self.last_added = chain def get(self, table): + if table not in self.chain.keys(): + return {} return self.chain[table] def last(self):