From 67b5b752465bfbb0325dbce940b00e47454fed17 Mon Sep 17 00:00:00 2001 From: John Kinsella Date: Wed, 16 May 2012 19:52:32 -0700 Subject: [PATCH] CS-14955: security_group.py only creates ICMP iptables rules for ICMP type -1 Description: Unindented 3 lines to update logic flow to execute iptables when passed ICMP type is not -1. --- scripts/vm/network/security_group.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/vm/network/security_group.py b/scripts/vm/network/security_group.py index 861d7ea6ab2..cc2722a25d7 100755 --- a/scripts/vm/network/security_group.py +++ b/scripts/vm/network/security_group.py @@ -639,8 +639,8 @@ def add_network_rules(vm_name, vm_id, vm_ip, signature, seqno, vmMac, rules, vif range = start + "/" + end if start == "-1": range = "any" - for ip in ips: - execute("iptables -I " + vmchain + " -p icmp --icmp-type " + range + " " + direction + " " + ip + " -j "+ action) + for ip in ips: + execute("iptables -I " + vmchain + " -p icmp --icmp-type " + range + " " + direction + " " + ip + " -j "+ action) if allow_any and protocol != 'all': if protocol != 'icmp': @@ -649,7 +649,7 @@ def add_network_rules(vm_name, vm_id, vm_ip, signature, seqno, vmMac, rules, vif range = start + "/" + end if start == "-1": range = "any" - execute("iptables -I " + vmchain + " -p icmp --icmp-type " + range + " -j "+action) + execute("iptables -I " + vmchain + " -p icmp --icmp-type " + range + " -j "+action) egress_vmchain = egress_chain_name(vm_name) if egressrule == 0 :