KVM security bug: no forwarding rule applied

This commit is contained in:
Edison Su 2014-03-14 14:40:48 -07:00
parent e406adc081
commit e5c391fcf3
1 changed files with 1 additions and 1 deletions

View File

@ -978,7 +978,7 @@ def addFWFramework(brname):
execute("iptables -N " + brfwin)
try:
refs = execute("""iptables -n -L " + brfw + " | awk '/%s(.*)references/ {gsub(/\(/, "") ;print $3}'""" % brfw).strip()
refs = execute("""iptables -n -L %s | awk '/%s(.*)references/ {gsub(/\(/, "") ;print $3}'""" % (brfw,brfw)).strip()
if refs == "0":
execute("iptables -I FORWARD -i " + brname + " -j DROP")
execute("iptables -I FORWARD -o " + brname + " -j DROP")