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

fix(inputs.netflow): Handle malformed inputs gracefully #14373

Merged
merged 4 commits into from
Dec 4, 2023

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented Dec 1, 2023

Summary

Some devices send malformed data, for example empty data for zero values, like in issue #14370. Currently we panic on those data chunks if they do not match the decoder expectations.
This PR converts decoding to return an error instead of panicking and furthermore accepts empty integers as zero values.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #14370

@telegraf-tiger telegraf-tiger bot added fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Dec 1, 2023
@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Dec 1, 2023

@srebhan srebhan added the area/network New plugins or feature relating to Network Monitoring label Dec 1, 2023
@Hipska Hipska added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Dec 4, 2023
@srebhan srebhan assigned powersj and unassigned srebhan Dec 4, 2023
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@powersj powersj merged commit ce64421 into influxdata:master Dec 4, 2023
@github-actions github-actions bot added this to the v1.29.0 milestone Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/network New plugins or feature relating to Network Monitoring fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[inputs.netflow] panic when decoding uint
3 participants