CS-14732. ec2-revoke: Revoking an ingress rule relatng one cidr results in revoking

an ingress rule pointing to a different cidr, when the protocol and port are the same.
Resolved. In the request set the cidr correctly.
This commit is contained in:
Likitha Shetty 2012-05-15 16:34:35 +05:30
parent 52df9da27c
commit 91bde4f926
1 changed files with 4 additions and 2 deletions

View File

@ -155,8 +155,10 @@ public class EC2SoapServiceImpl implements AmazonEC2SkeletonInterface {
IpRangeSetType ranges = ipPerm.getIpRanges();
if (ranges != null && ranges.getItem() != null) {
IpRangeItemType[] rangeItems = ranges.getItem();
for (IpRangeItemType ipRange: rangeItems)
perm.addIpRange( ipRange.getCidrIp() );
for (IpRangeItemType ipRange: rangeItems) {
perm.addIpRange( ipRange.getCidrIp() );
perm.setCIDR(ipRange.getCidrIp());
}
}
request.addIpPermission( perm );