Skip to content
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

Community ID is incorrect for ICMP #891

Closed
DylanRJohnston opened this issue Jun 13, 2024 · 7 comments
Closed

Community ID is incorrect for ICMP #891

DylanRJohnston opened this issue Jun 13, 2024 · 7 comments
Labels
type: bug A code related bug vrl: stdlib Changes to the standard library

Comments

@DylanRJohnston
Copy link

I've let the upstream library know of the problem, but I thought you guys might also be interested in the problem. traceflight/rs-community-id#3

@jszwedko jszwedko added type: bug A code related bug vrl: stdlib Changes to the standard library labels Jun 13, 2024
@jszwedko
Copy link
Member

Thanks! We'll track the upstream issue.

@DylanRJohnston
Copy link
Author

I've got a pull request up to fix the issue traceflight/rs-community-id#4

@DylanRJohnston
Copy link
Author

DylanRJohnston commented Jun 14, 2024

I also think the documentation needs to be updated on the community_id function to point out that source_port and destination_port for ICMP are actually and ICMP type and ICMP code respectively. This was very confusing when I was first investigating the issue, especially as Elastic Search separates those arguments. Perhaps it would be wise to do the same as semantic overloading of named arguments is very confusing. Although if you wanted to introduce a more accurate error message this would be a breaking change.

@DylanRJohnston
Copy link
Author

Found further problems with the handling of ICMP with IPv6 addresses traceflight/rs-community-id#5

@jszwedko
Copy link
Member

Nice, thanks @DylanRJohnston, good finds.

The overloading of port to be ICMP type and code is a bit confusing. I see that, for example, the Go library has separate functions per level 4 protocol and also ICMP. We could do something similar. Notably the C implementation seems to also overload like we are. I'll open a PR to update the docs for now at least.

@jszwedko
Copy link
Member

Docs update: vectordotdev/vector#20677

@traceflight
Copy link
Contributor

Thanks @DylanRJohnston. I have released a new version of rs-community-id. Feel free to mention me if any issue found~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A code related bug vrl: stdlib Changes to the standard library
Projects
None yet
Development

No branches or pull requests

3 participants