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 uninitialized go connection info #1019

Merged
merged 5 commits into from
Jul 16, 2024
Merged

Conversation

grcevski
Copy link
Contributor

We had checks in the eBPF code for finding the connection information, but we didn't check if we actually found the final connection pointer, or the file descriptor. In this scenario we'd generate bogus ip information which might cause large number of DNS queries.

I also made sure empty IP addresses end up as empty strings, so the name resolver will ignore them.

Fixes #895

@codecov-commenter
Copy link

codecov-commenter commented Jul 15, 2024

Codecov Report

Attention: Patch coverage is 73.33333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 73.02%. Comparing base (635938c) to head (caeb95b).

Files Patch % Lines
pkg/internal/ebpf/common/common.go 66.66% 2 Missing and 2 partials ⚠️

❗ There is a different number of reports uploaded between BASE (635938c) and HEAD (caeb95b). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (635938c) HEAD (caeb95b)
unittests 1 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1019      +/-   ##
==========================================
- Coverage   81.60%   73.02%   -8.59%     
==========================================
  Files         137      136       -1     
  Lines       10935    10914      -21     
==========================================
- Hits         8924     7970     -954     
- Misses       1502     2307     +805     
- Partials      509      637     +128     
Flag Coverage Δ
integration-test 56.56% <73.33%> (+0.17%) ⬆️
k8s-integration-test 59.02% <66.66%> (+0.02%) ⬆️
oats-test 37.33% <66.66%> (-0.06%) ⬇️
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@mariomac mariomac left a comment

Choose a reason for hiding this comment

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

LGTM! Before merging, I'd recommend merging the main branch and regenerating the BPF binaries.

@grcevski grcevski merged commit 27dc018 into grafana:main Jul 16, 2024
5 of 6 checks passed
@grcevski grcevski deleted the fix_go_conn_empty branch July 16, 2024 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

beyla is overloading the external dns server with frequent ipv6 reverse lookups
3 participants