-
-
Notifications
You must be signed in to change notification settings - Fork 95
Fix subnet queries for some subnets #3060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97b96a7
to
cef37bd
Compare
tobim
requested changes
Apr 5, 2023
cef37bd
to
37531d4
Compare
37531d4
to
d02fb26
Compare
VAST incorrectly handled subnets created using IPv6 addresses for which an equivalent IPv4 address existed. This comes with a few changes: - Specifying a /0 subnet is now allowed, and comparisons with such subnets now work correctly. - The internal representation of subnets always represents the prefix on a scale of 0 to 128 inclusive. - The subnet parser now forbids specifying a subnet using an IPv4 address and a prefix above 32, and creates the subnet with the prefix shifted by 96 accordingly. - The IP index now optimizes queries that filter IPv4 addresses, e.g., `where :ip !in ::ffff:0:0/96` shows all events that contain an IPv6 address that cannot be represented as a valid IPv4 address. - Subnets whose network can be represented as an IPv4 address but whose prefix was below 96 now render correctly using an IPv6 address. - We now expose IPv4 and IPv6 parsers in addition to the existing IP parser, and also expose an IPv6 printer in addition to the existing IP printer.
d02fb26
to
34006e5
Compare
tobim
approved these changes
Apr 6, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic changes and new tests look right now.
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes an issue reported by @satta, who tried querying for all IPv6 addresses that did not have an equivalent IPv4 address.
VAST incorrectly handled subnets created using IPv6 addresses for which an equivalent IPv4 address existed. This comes with a few changes:
where :ip !in ::ffff:0:0/96
shows all events that contain an IPv6 address that cannot be represented as a valid IPv4 address.