[PR #4710] [CLOSED] [Client] cleanup leftover dns and nrpt policies on windows #21035

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/4710
Author: @Exobitt
Created: 10/28/2025
Status: Closed

Base: mainHead: handle-dns-nrpt-leftovers-windows


📝 Commits (4)

  • f823385 Add functionality to cleanup leftover dns and nrpt policies on windows
  • c01ffc3 Change of cleanup logic in order to work
  • f62bad7 Added semicolon
  • e58f0d6 Coderabbit suggestions

📊 Changes

1 file changed (+26 additions, -0 deletions)

View changed files

📝 client/installer.nsis (+26 -0)

📄 Description

Describe your changes

In some cases, the Windows client does not clean up DNS and NRPT policies in the registry.
This can break the user's DNS resolution when using split-horizon DNS.
If these entries are not properly removed, the user may lose access to domains configured under the split-horizon setup.

N/A

Stack

Windows

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)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)
    It happens in the uninstaller

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

Summary by CodeRabbit

  • Bug Fixes
    • Adds explicit DNS policy cleanup during uninstall to remove leftover DNS entries and improve network state
    • Restarts the DNS client service as part of uninstall to ensure changes take effect
    • Clarifies and preserves the user data deletion choice, adds a brief wait before final removal to avoid conflicts
    • Improves uninstall logging and step sequencing for more reliable diagnostics

✏️ Tip: You can customize this high-level summary in your review settings.


🔄 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/4710 **Author:** [@Exobitt](https://github.com/Exobitt) **Created:** 10/28/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `handle-dns-nrpt-leftovers-windows` --- ### 📝 Commits (4) - [`f823385`](https://github.com/netbirdio/netbird/commit/f823385cefe249e9aec68b8a520fdec67274a6bd) Add functionality to cleanup leftover dns and nrpt policies on windows - [`c01ffc3`](https://github.com/netbirdio/netbird/commit/c01ffc32f343d6c2f873c6a63405f0907c4157e6) Change of cleanup logic in order to work - [`f62bad7`](https://github.com/netbirdio/netbird/commit/f62bad7c0e65ddbd7498d75aaebc444b585b811c) Added semicolon - [`e58f0d6`](https://github.com/netbirdio/netbird/commit/e58f0d61b117c4db660c9afbbee785fc1c04ad67) Coderabbit suggestions ### 📊 Changes **1 file changed** (+26 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `client/installer.nsis` (+26 -0) </details> ### 📄 Description ## Describe your changes In some cases, the Windows client does not clean up DNS and NRPT policies in the registry. This can break the user's DNS resolution when using split-horizon DNS. If these entries are not properly removed, the user may lose access to domains configured under the split-horizon setup. ## Issue ticket number and link N/A ## Stack Windows <!-- branch-stack --> ### 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) > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) It happens in the uninstaller ### Docs PR URL (required if "docs added" is checked) Paste the PR link from https://github.com/netbirdio/docs here: https://github.com/netbirdio/docs/pull/__ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Adds explicit DNS policy cleanup during uninstall to remove leftover DNS entries and improve network state * Restarts the DNS client service as part of uninstall to ensure changes take effect * Clarifies and preserves the user data deletion choice, adds a brief wait before final removal to avoid conflicts * Improves uninstall logging and step sequencing for more reliable diagnostics <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <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 05:08:00 -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#21035