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

🐛 BUG: packet loss calculation misses some loss #1255

Open
brianbraunstein opened this issue Oct 18, 2024 · 1 comment
Open

🐛 BUG: packet loss calculation misses some loss #1255

brianbraunstein opened this issue Oct 18, 2024 · 1 comment

Comments

@brianbraunstein
Copy link

What version of nebula are you using? (nebula -version)

master

What operating system are you using?

not relevant

Describe the Bug

nebula/bits.go

Lines 66 to 68 in 3f6a7cb

for n := b.current + 1; n < i; n++ {
b.bits[n%b.length] = false
}

In this if statement, the b.bits entries that are being set to false should first be checked to see if any are already false, and if so the lostCounter should be incremented for each.

This means any case where you lose more than 1 packet, you risk not counting older packet loss that it skips over.

Logs from affected hosts

not relevant

Config files from affected hosts

not relevant

@joehiggi1758
Copy link

Hello @brianbraunstein - hope you're having a wonderful day!

I'm relatively new to Nebula and Go, but stumbled upon this and would like to take a crack. I'll submit a PR shortly!

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

No branches or pull requests

2 participants