diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2014-12-10 08:56:48 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2014-12-10 08:56:48 +0200 |
commit | bdd68868836f01ac766afa1a6c79a5f7d4287da6 (patch) | |
tree | d875e9fbf02575c9da52a2846ac00d09d5d3cefa /etc/describe-security-groups.fln | |
parent | 85dfe24a45c65a9f414769fe059b1c5a06a3b176 (diff) | |
download | eclat-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')
-rw-r--r-- | etc/describe-security-groups.fln | 12 |
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 @@ -22,13 +22,17 @@ if (.DescribeSecurityGroupsResponse.securityGroupInfo) { for (var in grp.tagSet.item) { print("TAG ", var.key, "\t", var.value, "\n"); } 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"); } for (usr in var.groups.item) { print("user ", usr.userId, ", group ", usr.groupId, " (", usr.groupName, @@ -39,13 +43,17 @@ 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"); } for (usr in var.groups.item) { print("user ", usr.userId, ", group ", usr.groupId, " (", usr.groupName, |