cdk-real-drift 0.2.71 → 0.2.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +3 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1006,6 +1006,7 @@ function resolve$1(node, ctx) {
|
|
|
1006
1006
|
case "Fn::Cidr": {
|
|
1007
1007
|
if (!Array.isArray(v) || v.length < 3) return UNRESOLVED;
|
|
1008
1008
|
const [ipBlock, count, cidrBits] = v.slice(0, 3).map((x) => resolve$1(x, ctx));
|
|
1009
|
+
if (ipBlock === UNRESOLVED || count === UNRESOLVED || cidrBits === UNRESOLVED) return UNRESOLVED;
|
|
1009
1010
|
return resolveCidr(ipBlock, count, cidrBits);
|
|
1010
1011
|
}
|
|
1011
1012
|
case "Fn::ImportValue": {
|
|
@@ -1126,11 +1127,11 @@ function resolveCidr(ipBlock, count, cidrBits) {
|
|
|
1126
1127
|
if (maskLen < prefix) return UNRESOLVED;
|
|
1127
1128
|
const step = 2 ** bits;
|
|
1128
1129
|
const blockSize = 2 ** (32 - prefix);
|
|
1129
|
-
|
|
1130
|
+
if (base % blockSize !== 0) return UNRESOLVED;
|
|
1130
1131
|
if (cnt * step > blockSize) return UNRESOLVED;
|
|
1131
1132
|
const out = [];
|
|
1132
1133
|
for (let i = 0; i < cnt; i++) {
|
|
1133
|
-
const addr =
|
|
1134
|
+
const addr = base + i * step;
|
|
1134
1135
|
if (addr > 4294967295) return UNRESOLVED;
|
|
1135
1136
|
out.push(`${intToIpv4(addr)}/${maskLen}`);
|
|
1136
1137
|
}
|