[PR #5625] fix(dns): skip probe for NetBird overlay addresses at engine startup #26312

Open
opened 2026-08-05 07:07:10 -04:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/5625

State: closed
Merged: No


Describe your changes

When a nameserver is configured with a NetBird overlay IP (in the 100.64.0.0/10 CGNAT range), ProbeAvailability() is called at engine startup before the WireGuard tunnel to that peer is established. The probe always fails at this point — not because the nameserver is down, but because the tunnel isn't up yet. This produces a spurious "Unable to reach one or more DNS servers" warning in netbird status -d even though DNS resolves correctly once the connection settles.

This change skips the startup probe for any nameserver whose IP falls within the NetBird CGNAT range. A debug log message is emitted instead. These nameservers continue to be exercised normally by real DNS queries, and the waitUntilResponse retry loop still handles genuine failures.

Non-overlay nameservers (LAN IPs, public DNS) are unaffected and continue to be probed as before.

N/A — no existing issue. This addresses a known annoyance discussed in the NetBird community forum: https://forum.netbird.io/t/unable-to-reach-one-or-more-dns-servers/204

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)

Documentation

  • Documentation is not needed for this change (explain why)

This is a bug fix for a false-positive warning with no user-facing behaviour change. DNS resolution is unaffected.

Summary by CodeRabbit

  • Bug Fixes

    • Skip CGNAT overlay (100.64.0.0/10) addresses during startup probes to avoid false-positive DNS failures; skipping is logged and treated as passed.
    • Improve shutdown coordination and concurrency safety for probing and disabling to ensure clean stop behavior.
    • Aggregate probe errors and strengthen context-aware probing/cancellation for more reliable failure reporting.
  • Tests

    • Added comprehensive tests covering overlay detection and probing behavior across LAN, public, mixed, and overlay-only scenarios.
**Original Pull Request:** https://github.com/netbirdio/netbird/pull/5625 **State:** closed **Merged:** No --- ## Describe your changes When a nameserver is configured with a NetBird overlay IP (in the `100.64.0.0/10` CGNAT range), `ProbeAvailability()` is called at engine startup before the WireGuard tunnel to that peer is established. The probe always fails at this point — not because the nameserver is down, but because the tunnel isn't up yet. This produces a spurious "Unable to reach one or more DNS servers" warning in `netbird status -d` even though DNS resolves correctly once the connection settles. This change skips the startup probe for any nameserver whose IP falls within the NetBird CGNAT range. A debug log message is emitted instead. These nameservers continue to be exercised normally by real DNS queries, and the `waitUntilResponse` retry loop still handles genuine failures. Non-overlay nameservers (LAN IPs, public DNS) are unaffected and continue to be probed as before. ## Issue ticket number and link N/A — no existing issue. This addresses a known annoyance discussed in the NetBird community forum: https://forum.netbird.io/t/unable-to-reach-one-or-more-dns-servers/204 ## Stack <!-- branch-stack --> ### Checklist - [x] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [ ] It is a refactor - [x] Created tests that fail without the change (if possible) ## Documentation - [x] Documentation is **not needed** for this change (explain why) This is a bug fix for a false-positive warning with no user-facing behaviour change. DNS resolution is unaffected. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Skip CGNAT overlay (100.64.0.0/10) addresses during startup probes to avoid false-positive DNS failures; skipping is logged and treated as passed. * Improve shutdown coordination and concurrency safety for probing and disabling to ensure clean stop behavior. * Aggregate probe errors and strengthen context-aware probing/cancellation for more reliable failure reporting. * **Tests** * Added comprehensive tests covering overlay detection and probing behavior across LAN, public, mixed, and overlay-only scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
saavagebueno added the pull-request label 2026-08-05 07:07:10 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#26312