Skip to content

Quietly log error on UDP_NETRESET ioctl on Windows. - #1453

Merged
brad-defined merged 2 commits into
release-1.9from
windows-rio-wat
Aug 19, 2025
Merged

Quietly log error on UDP_NETRESET ioctl on Windows.#1453
brad-defined merged 2 commits into
release-1.9from
windows-rio-wat

Conversation

@brad-defined

Copy link
Copy Markdown
Collaborator

Windows is returning errors on UDP_NETRESET ioctls now. This code was inspired by golang stdlib code, and included as a best effort to minimize the number of errors returned by Windows udp receive operations.

When this fails, Nebula falls back to the generic UDP code.

This PR updates the ioctls to quietly log failures and continue processing.

I manually tested this and I do not see errors being returned by the udp receive operation when the Windows host receives icmp unreachable messages.

Comment thread udp/udp_rio_windows.go Outdated
return
}
u.l.WithError(err).Error("unexpected udp socket receive error")
u.l.WithError(err).Warn("unexpected udp socket receive error")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I suspect this can get really noisy if we failed to disable the icmp error reporting on a busy host.

Are we able to do any error equality checking and suppress logging when we encounter those icmp errors?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

oh sorry, I got deep into trying to repro scenarios and forgot I promised to dampen this. Let me see what I can do here.

@brad-defined

Copy link
Copy Markdown
Collaborator Author

@nbrownus I failed to generate ICMP TTL errors and get them to actually be received by the host. In lieu of that, I hacked up some dampening code so that the unexpected warnings will not be output any more often than once per minute.

@brad-defined
brad-defined merged commit 1d73e46 into release-1.9 Aug 19, 2025
8 checks passed
@brad-defined
brad-defined deleted the windows-rio-wat branch August 19, 2025 21:33
@wadey wadey added this to the v1.9.7 milestone Sep 10, 2025
alexm-occ pushed a commit to oneclick-ag/nebula that referenced this pull request Nov 13, 2025
* Quietly log error on UDP_NETRESET ioctl on Windows.

* dampen unexpected error warnings
@nbrownus nbrownus mentioned this pull request Nov 19, 2025
63 tasks
nbrownus pushed a commit that referenced this pull request Jan 9, 2026
* Quietly log error on UDP_NETRESET ioctl on Windows.

* dampen unexpected error warnings
nbrownus added a commit that referenced this pull request Jan 9, 2026
Co-authored-by: brad-defined <77982333+brad-defined@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants