[PR #978] [MERGED] Fix disabled DNS resolver fail #14654

Closed
opened 2026-08-05 03:06:04 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/978
Author: @gigovich
Created: 6/21/2023
Status: Merged
Merged: 6/22/2023
Merged by: @gigovich

Base: mainHead: fix-disabled-dns-resolver-fail


📝 Commits (8)

  • 4619614 Fix fail of DNS when it disabled in the settings
  • 6898bfe Test case for proper handling internal state of DNS manager
  • 7345fdb Fixa race
  • 067a088 Fix test
  • 76d0d15 Remove waitgroup
  • 815b469 Fix issue with local address select for kernel variant
  • f02dc3e Use different DNS server address obtain functions for bind and kernel
  • 929aba1 Review fixes

📊 Changes

2 files changed (+164 additions, -30 deletions)

View changed files

📝 client/internal/dns/server.go (+34 -29)
📝 client/internal/dns/server_test.go (+130 -1)

📄 Description

Describe your changes

When DNS server runs in a fake resolver, there is an issue with incorrect handling disable state because we still receive updates from the management. Add extra checking and fix panic.

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/978 **Author:** [@gigovich](https://github.com/gigovich) **Created:** 6/21/2023 **Status:** ✅ Merged **Merged:** 6/22/2023 **Merged by:** [@gigovich](https://github.com/gigovich) **Base:** `main` ← **Head:** `fix-disabled-dns-resolver-fail` --- ### 📝 Commits (8) - [`4619614`](https://github.com/netbirdio/netbird/commit/46196146f5abfe2e13ebe9e5bbc5115452c4807d) Fix fail of DNS when it disabled in the settings - [`6898bfe`](https://github.com/netbirdio/netbird/commit/6898bfe45a4a89d4e7fb70d74ca994337ea91f71) Test case for proper handling internal state of DNS manager - [`7345fdb`](https://github.com/netbirdio/netbird/commit/7345fdb092ead0c5600beff9d0328397d93b0a8c) Fixa race - [`067a088`](https://github.com/netbirdio/netbird/commit/067a088933fdd1b9709c0490b31e918cda15bd7a) Fix test - [`76d0d15`](https://github.com/netbirdio/netbird/commit/76d0d15b94407741764a56803b3d39896cc0544e) Remove waitgroup - [`815b469`](https://github.com/netbirdio/netbird/commit/815b469b2d845ce6ceab5b5a4c69b3d1e955b5e9) Fix issue with local address select for kernel variant - [`f02dc3e`](https://github.com/netbirdio/netbird/commit/f02dc3eeafb17b133cad2d70e8c8b6467b412e49) Use different DNS server address obtain functions for bind and kernel - [`929aba1`](https://github.com/netbirdio/netbird/commit/929aba1e6cd1d30f31a9025668688d5c3c3c15dc) Review fixes ### 📊 Changes **2 files changed** (+164 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `client/internal/dns/server.go` (+34 -29) 📝 `client/internal/dns/server_test.go` (+130 -1) </details> ### 📄 Description ## Describe your changes When DNS server runs in a fake resolver, there is an issue with incorrect handling disable state because we still receive updates from the management. Add extra checking and fix panic. ## Issue ticket number and link ### 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) - [ ] 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 03:06:04 -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#14654