From 106ccc5b7bcc6cfc70e6edc74bfe3beb48c23e38 Mon Sep 17 00:00:00 2001 From: Vijayendra Bhamidipati Date: Wed, 29 Aug 2012 19:00:49 -0700 Subject: [PATCH] CS-16207: Inver-Vlan-Routing: Creating ACL rules with traffic type "Egress" Fails Reviewed-by: Vijayendra Bhamidipati Description: Capturing return status of iptables commands when setting ingress/egress ACL rules immediately after they execute. --- patches/systemvm/debian/config/opt/cloud/bin/vpc_acl.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/patches/systemvm/debian/config/opt/cloud/bin/vpc_acl.sh b/patches/systemvm/debian/config/opt/cloud/bin/vpc_acl.sh index c64d218070e..ef0baf090da 100755 --- a/patches/systemvm/debian/config/opt/cloud/bin/vpc_acl.sh +++ b/patches/systemvm/debian/config/opt/cloud/bin/vpc_acl.sh @@ -121,9 +121,11 @@ acl_entry_for_guest_network() { then sudo iptables -I ACL_INBOUND_$dev -p $prot -s $lcidr \ --icmp-type $typecode -j ACCEPT + result=$? else sudo iptables -t mangle -I ACL_OUTBOUND_$dev -p $prot -d $lcidr \ --icmp-type $typecode -j ACCEPT + result=$? let egress++ fi else @@ -131,13 +133,14 @@ acl_entry_for_guest_network() { then sudo iptables -I ACL_INBOUND_$dev -p $prot -s $lcidr \ $DPORT -j ACCEPT + result=$? else sudo iptables -t mangle -I ACL_OUTBOUND_$dev -p $prot -d $lcidr \ $DPORT -j ACCEPT + result=$? let egress++ fi fi - result=$? [ $result -gt 0 ] && logger -t cloud "Error adding iptables entry for guest network : $gcidr,inbound:$inbound:$prot:$sport:$eport:$cidrs" && break