[PR #1489] [MERGED] Validate upstream reachability on first DNS configuration #13798

Closed
opened 2026-08-05 02:09:02 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1489
Author: @lixmal
Created: 1/22/2024
Status: Merged
Merged: 1/23/2024
Merged by: @lixmal

Base: mainHead: validate-upstream-dns


📝 Commits (2)

  • bd8c8f3 Test upstream DNS for availability as soon as they are received from management
  • f1c6fdc Use root zone for DNS tests

📊 Changes

8 files changed (+119 additions, -23 deletions)

View changed files

📝 client/internal/dns/local.go (+2 -0)
📝 client/internal/dns/mock_server.go (+4 -0)
📝 client/internal/dns/server.go (+13 -2)
📝 client/internal/dns/upstream.go (+77 -15)
📝 client/internal/dns/upstream_ios.go (+5 -1)
📝 client/internal/dns/upstream_nonios.go (+8 -4)
📝 client/internal/dns/upstream_test.go (+6 -1)
📝 client/internal/engine.go (+4 -0)

📄 Description

Describe your changes

This adds an availability check for each DNS server group right after receiving DNS updates from management.
If no servers of a group are available the group will be disabled.

When we receive an upstream DNS server, we add the address in the system without checking if the address is reachable; this may cause issues as some queries will fail and may delay peer connection if the domains served by the upstream might contain our management layer.

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)
  • Extended the README / documentation, if necessary

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/1489 **Author:** [@lixmal](https://github.com/lixmal) **Created:** 1/22/2024 **Status:** ✅ Merged **Merged:** 1/23/2024 **Merged by:** [@lixmal](https://github.com/lixmal) **Base:** `main` ← **Head:** `validate-upstream-dns` --- ### 📝 Commits (2) - [`bd8c8f3`](https://github.com/netbirdio/netbird/commit/bd8c8f37e706826b8fcfc5ec7dadf298e42e42c0) Test upstream DNS for availability as soon as they are received from management - [`f1c6fdc`](https://github.com/netbirdio/netbird/commit/f1c6fdc82ccb945c87ff039b4639c0997aa998b7) Use root zone for DNS tests ### 📊 Changes **8 files changed** (+119 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `client/internal/dns/local.go` (+2 -0) 📝 `client/internal/dns/mock_server.go` (+4 -0) 📝 `client/internal/dns/server.go` (+13 -2) 📝 `client/internal/dns/upstream.go` (+77 -15) 📝 `client/internal/dns/upstream_ios.go` (+5 -1) 📝 `client/internal/dns/upstream_nonios.go` (+8 -4) 📝 `client/internal/dns/upstream_test.go` (+6 -1) 📝 `client/internal/engine.go` (+4 -0) </details> ### 📄 Description ## Describe your changes This adds an availability check for each DNS server group right after receiving DNS updates from management. If no servers of a group are available the group will be disabled. ## Issue ticket number and link When we receive an upstream DNS server, we add the address in the system without checking if the address is reachable; this may cause issues as some queries will fail and may delay peer connection if the domains served by the upstream might contain our management layer. ### Checklist - [x] 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) - [ ] Extended the README / documentation, if necessary --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 02:09:02 -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#13798