-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
@aws-cdk/aws-lambdaRelated to AWS LambdaRelated to AWS LambdabugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp2
Description
Describe the bug
rangesOverlap uses string comparison to determine overlap, which I believe is incorrect.
// example
rangesOverlap(
["10.0.0.0", "10.0.15.255"], // 10.0.0.0/20
["10.0.128.0", "10.0.143.255"] // 10.0.128.0/20
)The above example should return false, but it returns true. Double checked some online tool to confirm that the cidrs do not actually overlap (https://cidrclash.com/clash-results).
Regression Issue
- Select this option if this issue appears to be a regression.
Last Known Working CDK Version
No response
Expected Behavior
rangesOverlap implements proper cidr comparison
Current Behavior
Implementation is incorrect
Reproduction Steps
See description
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.167.0-alpha.0
Framework Version
No response
Node.js Version
22
OS
MacOS
Language
TypeScript
Language Version
No response
Other information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-lambdaRelated to AWS LambdaRelated to AWS LambdabugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp2