summaryrefslogtreecommitdiffabout
path: root/etc/describe-security-groups.fln
authorSergey Poznyakoff <gray@gnu.org>2014-12-10 06:56:48 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2014-12-10 06:56:48 (GMT)
commitbdd68868836f01ac766afa1a6c79a5f7d4287da6 (patch) (side-by-side diff)
treed875e9fbf02575c9da52a2846ac00d09d5d3cefa /etc/describe-security-groups.fln
parent85dfe24a45c65a9f414769fe059b1c5a06a3b176 (diff)
downloadeclat-bdd68868836f01ac766afa1a6c79a5f7d4287da6.tar.gz
eclat-bdd68868836f01ac766afa1a6c79a5f7d4287da6.tar.bz2
Fix coredump when comparing non-existing nodes.
* lib/forlan.c (coerce_value): Handle NULL nodes. (values_equal): Handle NULL strings. (dump_expr): Handle EQ and NE. * lib/forlanlex.l: Fix distinction before negative numeric and identifier. * etc/describe-security-groups.fln: ipProtocol == "-1" means "all". * tests/Makefile.am: Add new tests. * tests/testsuite.at: Likewise. * tests/comp00.at: New file. * tests/comp01.at: New file. * tests/comp02.at: New file. * tests/comp03.at: New file. * tests/comp04.at: New file. * tests/tforlan.c (main): Optionally read XML from standard input.
Diffstat (limited to 'etc/describe-security-groups.fln') (more/less context) (ignore whitespace changes)
-rw-r--r--etc/describe-security-groups.fln12
1 files changed, 10 insertions, 2 deletions
diff --git a/etc/describe-security-groups.fln b/etc/describe-security-groups.fln
index 12a1379..4765c4a 100644
--- a/etc/describe-security-groups.fln
+++ b/etc/describe-security-groups.fln
@@ -25,7 +25,11 @@ if (.DescribeSecurityGroupsResponse.securityGroupInfo) {
print("Incoming:\n");
for (var in grp.ipPermissions.item) {
for (range in var.ipRanges.item) {
- print(var.ipProtocol,"\t",range.cidrIp,"\t",var.fromPort);
+ if (var.ipProtocol == "-1")
+ print("all");
+ else
+ print(var.ipProtocol);
+ print("\t",range.cidrIp,"\t",var.fromPort);
if (var.fromPort != var.toPort)
print("-",var.toPort);
print("\n");
@@ -42,7 +46,11 @@ if (.DescribeSecurityGroupsResponse.securityGroupInfo) {
print("Outgoing:\n");
for (var in grp.ipPermissionsEgress.item) {
for (range in var.ipRanges.item) {
- print(var.ipProtocol,"\t",range.cidrIp,"\t",var.fromPort);
+ if (var.ipProtocol == "-1")
+ print("all");
+ else
+ print(var.ipProtocol);
+ print("\t",range.cidrIp,"\t",var.fromPort);
if (var.fromPort != var.toPort)
print("-",var.toPort);
print("\n");

Return to:

Send suggestions and report system problems to the System administrator.