mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
KVM security bug: no forwarding rule applied
(cherry picked from commit e5c391fcf3852e50ebd99d4a72fd51d1753b05eb) Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
This commit is contained in:
parent
e656201fee
commit
2276a399ac
@ -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")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user